From bf971b00af8aad26fe4caa751ffbef032a150d16 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sat, 8 Aug 2020 17:27:51 -0400 Subject: [PATCH] Fix a mountain of unused variable warnings --- indra/llaudio/llaudiodecodemgr.cpp | 8 ++++++++ indra/newview/llaccountingcostmanager.cpp | 3 --- indra/newview/llappearancemgr.cpp | 2 +- indra/newview/lldrawpoolwater.cpp | 5 +---- indra/newview/llfloaterscriptlimits.cpp | 1 - indra/newview/llimview.cpp | 4 ++-- indra/newview/llinventoryfilter.cpp | 1 - indra/newview/llinventoryfunctions.cpp | 3 --- indra/newview/llinventorymodel.cpp | 1 - indra/newview/llmanip.cpp | 3 --- indra/newview/lloutfitslist.cpp | 3 +-- indra/newview/llpanellandmedia.cpp | 1 - indra/newview/llpanelplaces.cpp | 1 - indra/newview/llpresetsmanager.cpp | 2 -- indra/newview/llskinningutil.cpp | 6 ++++++ indra/newview/llspeakers.cpp | 1 - indra/newview/llviewermenu.cpp | 1 - indra/newview/llviewertexteditor.cpp | 1 - indra/newview/llviewerwindow.cpp | 1 - indra/newview/llvoavatar.cpp | 1 - indra/newview/llvovolume.cpp | 3 --- 21 files changed, 19 insertions(+), 33 deletions(-) diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index f11d11f547e..cb22eaec5e7 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -38,8 +38,16 @@ #include "llvorbisencode.h" +#if LL_GNUC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" +#if LL_GNUC +#pragma GCC diagnostic pop +#endif + #include <iterator> #include <deque> diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp index e09527a34b5..21553b497c2 100644 --- a/indra/newview/llaccountingcostmanager.cpp +++ b/indra/newview/llaccountingcostmanager.cpp @@ -97,11 +97,8 @@ void LLAccountingCostManager::accountingCostCoro(std::string url, dataToPost[keystr.c_str()] = objectList; LLAccountingCostObserver* observer = observerHandle.get(); - LLUUID transactionId = observer->getTransactionID(); observer = NULL; - - LLSD results = httpAdapter->postAndSuspend(httpRequest, url, dataToPost); LLSD httpResults = results["http_result"]; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e547ea99fd4..6c61a8e00b4 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4223,7 +4223,7 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo // existence of AIS as an indicator the fix is present. Does // not actually use AIS to create the category. inventory_func_type func = boost::bind(&LLAppearanceMgr::onOutfitFolderCreated,this,_1,show_panel); - LLUUID folder_id = gInventory.createNewCategory( + gInventory.createNewCategory( parent_id, LLFolderType::FT_OUTFIT, new_folder_name, diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 8605962ae5e..64e439839b6 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -717,7 +717,6 @@ void LLDrawPoolWater::shade() light_diffuse *= 6.f; LLGLSLShader* shader = nullptr; - LLGLSLShader* edge_shader = nullptr; F32 eyedepth = LLViewerCamera::getInstance()->getOrigin().mV[2] - environment.getWaterHeight(); @@ -735,13 +734,11 @@ void LLDrawPoolWater::shade() else if (deferred_render) { shader = &gDeferredWaterProgram; - edge_shader = nullptr; } else { shader = &gWaterProgram; - edge_shader = nullptr; - } + } static const LLCachedControl<bool> render_water_mip_normal(gSavedSettings, "RenderWaterMipNormal"); diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 3746b9b6c28..40fe11b3093 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -421,7 +421,6 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) for(S32 i = 0; i < number_parcels; i++) { std::string parcel_name = content["parcels"][i]["name"].asString(); - LLUUID parcel_id = content["parcels"][i]["id"].asUUID(); S32 number_objects = content["parcels"][i]["objects"].size(); S32 local_id = 0; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c8a7faf307c..9d4c382d991 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2501,7 +2501,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload } } - LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id, true); + gIMMgr->addSession(correct_session_name, type, session_id, true); std::string url = gAgent.getRegion()->getCapability( "ChatSessionRequest"); @@ -2587,7 +2587,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) } else { - LLUUID new_session_id = gIMMgr->addSession( + gIMMgr->addSession( payload["session_name"].asString(), type, session_id, true); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index b57bc5a4ed6..bfbeec68c2d 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -422,7 +422,6 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) const { LLInventoryType::EType object_type = item->getInventoryType(); - const LLUUID object_id = item->getUUID(); const U32 filterTypes = mFilterOps.mFilterTypes; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index bdedfd695f7..d5244bc9828 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1385,9 +1385,6 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol return false; } - // Get the parent folder of the moved item : we may have to update it - LLUUID src_folder = viewer_inv_item->getParentUUID(); - if (copy) { // Copy the item diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index ef5f0d19bb3..7a5c8148140 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2591,7 +2591,6 @@ void LLInventoryModel::buildParentChildMap() // some accounts has pbroken inventory root folders std::string name = "My Inventory"; - LLUUID prev_root_id = mRootFolderID; for (parent_cat_map_t::const_iterator it = mParentChildCategoryTree.begin(), it_end = mParentChildCategoryTree.end(); it != it_end; ++it) { diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 4843821215e..5978e697c84 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -568,9 +568,6 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt); } - LLColor4 shadow_color = LLColor4::black; - shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f; - if (fractional_portion != 0) { fraction_string = llformat("%c%02d%s", LLResMgr::getInstance()->getDecimalPoint(), fractional_portion, suffix.c_str()); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 71ab826e1cf..d3dcb1d22e1 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -826,9 +826,8 @@ void LLOutfitListBase::onOpen(const LLSD& info) mCategoriesObserver->addCategory(outfits, boost::bind(&LLOutfitListBase::refreshList, this, outfits)); - const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - // Start observing changes in Current Outfit category. + //const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); //mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this)); LLOutfitObserver::instance().addBOFChangedCallback(boost::bind(&LLOutfitListBase::highlightBaseOutfit, this)); diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index 26cd3ff1c19..e379d67e372 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -179,7 +179,6 @@ void LLPanelLandMedia::refresh() // enable/disable for text label for completeness mMediaSizeCtrlLabel->setEnabled( can_change_media && allow_resize ); - LLUUID tmp = parcel->getMediaID(); mMediaTextureCtrl->setImageAssetID ( parcel->getMediaID() ); mMediaTextureCtrl->setEnabled( can_change_media ); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 2ef82d0cf90..36875844920 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -769,7 +769,6 @@ void LLPanelPlaces::onSaveButtonClicked() LLStringUtil::trim(current_title_value); LLStringUtil::trim(current_notes_value); - LLUUID item_id = mItem->getUUID(); LLUUID folder_id = mLandmarkInfo->getLandmarkFolder(); bool change_parent = folder_id != mItem->getParentUUID(); diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index c267c3c6995..30d0a22ef07 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -332,7 +332,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n else { ECameraPreset new_camera_preset = (ECameraPreset)gSavedSettings.getU32("CameraPresetType"); - bool new_camera_offsets = false; if (IS_CAMERA) { if (isDefaultCameraPreset(name)) @@ -354,7 +353,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n { new_camera_preset = CAMERA_PRESET_CUSTOM; } - new_camera_offsets = (!isDefaultCameraPreset(name) || (ECameraPreset)gSavedSettings.getU32("CameraPresetType") != new_camera_preset); } for (std::vector<std::string>::iterator it = name_list.begin(); it != name_list.end(); ++it) { diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index c4d50ef670b..e84ba283474 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -211,7 +211,9 @@ void LLSkinningUtil::getPerVertexSkinMatrix( LLMatrix4a& final_mat, U32 max_joints) { +#ifdef SHOW_ASSERT bool valid_weights = true; +#endif final_mat.clear(); S32 idx[4]; @@ -237,7 +239,9 @@ void LLSkinningUtil::getPerVertexSkinMatrix( if (handle_bad_scale && scale <= 0.f) { wght = LLVector4(1.0f, 0.0f, 0.0f, 0.0f); +#ifdef SHOW_ASSERT valid_weights = false; +#endif } else { @@ -255,9 +259,11 @@ void LLSkinningUtil::getPerVertexSkinMatrix( final_mat.add(src); } +#ifdef SHOW_ASSERT // SL-366 - with weight validation/cleanup code, it should no longer be // possible to hit the bad scale case. llassert(valid_weights); +#endif } void LLSkinningUtil::initJointNums(LLMeshSkinInfo* skin, LLVOAvatar *avatar) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index e1a02209da6..8188adad295 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -968,7 +968,6 @@ void LLActiveSpeakerMgr::updateSpeakerList() // clean up text only speakers for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it) { - LLUUID speaker_id = speaker_it->first; LLSpeaker* speakerp = speaker_it->second; if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2c6a0c3a314..4d192275b4a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7629,7 +7629,6 @@ void handle_selected_texture_info(void*) map_t::iterator it; for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) { - LLUUID image_id = it->first; U8 te = it->second[0]; LLViewerTexture* img = node->getObject()->getTEImage(te); S32 height = img->getHeight(); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index e2de7ac825e..7abb42dd8a2 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1252,7 +1252,6 @@ bool LLViewerTextEditor::onCopyToInvDialog(const LLSD& notification, const LLSD& S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if( 0 == option ) { - LLUUID item_id = notification["payload"]["item_id"].asUUID(); llwchar wc = llwchar(notification["payload"]["item_wc"].asInteger()); LLInventoryItem* itemp = LLEmbeddedItems::getEmbeddedItemPtr(wc); if (itemp) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1a12d1c55d4..ecb8be0e983 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1205,7 +1205,6 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi TRUE /* pick_transparent */, FALSE /* pick_rigged */); - LLUUID object_id = pick_info.getObjectID(); S32 object_face = pick_info.mObjectFace; std::string url = data; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4b48ba048f4..f4dd409ae34 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -10078,7 +10078,6 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes) for ( LLVOAvatar::attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter ) { LLViewerJointAttachment* attachment = iter->second; - LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_end = attachment->mAttachedObjects.end(); for (LLViewerObject* attached_object : attachment->mAttachedObjects) { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 84f2b609afe..5c1866cfb7f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -809,9 +809,6 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) if (isSculpted()) { - LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); - LLUUID id = sculpt_params->getSculptTexture(); - updateSculptTexture(); if (mSculptTexture.notNull()) -- GitLab