From 710cbf564ddafa990f3c5ecf4b16020b4df56a75 Mon Sep 17 00:00:00 2001 From: Beq Date: Mon, 8 Sep 2025 21:45:25 +0100 Subject: [PATCH] More unused-but-set fixes. Also remove Linux exclusion Linux was suppressing these issues rather than fixing them. --- indra/cmake/00-Common.cmake | 2 +- indra/newview/lldrawpoolwater.cpp | 15 ++++++++------- indra/newview/llfloatergltfasseteditor.cpp | 2 +- indra/newview/llfloaterimagepreview.cpp | 2 +- indra/newview/llsurfacepatch.cpp | 2 +- indra/newview/llvoavatar.cpp | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index c120ad545d..c2c851bb08 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -243,7 +243,7 @@ if (LINUX OR DARWIN) endif () if(LINUX) - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable -Wno-unused-but-set-variable -Wno-pragmas -Wno-deprecated") + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-variable -Wno-pragmas -Wno-deprecated") endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 92759d9d49..d8dc8ec549 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -166,8 +166,8 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) //bool has_normal_mips = gSavedSettings.getBOOL("RenderWaterMipNormal"); bool has_normal_mips = mRenderWaterMipNormal; bool underwater = LLViewerCamera::getInstance()->cameraUnderWater(); - LLColor4 fog_color = LLColor4(pwater->getWaterFogColor(), 0.f); - LLColor3 fog_color_linear = linearColor3(fog_color); + // LLColor4 fog_color = LLColor4(pwater->getWaterFogColor(), 0.f); // set but unused + // LLColor3 fog_color_linear = linearColor3(fog_color); // set but unused if (sun_up) { @@ -244,11 +244,12 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) F32 fog_density = pwater->getModifiedWaterFogDensity(underwater); shader->bindTexture(LLShaderMgr::WATER_SCREENTEX, &gPipeline.mWaterDis); - - if (mShaderLevel == 1) - { - fog_color.mV[VALPHA] = (F32)(log(fog_density) / log(2)); - } + // set but unused "fog_color" + // if (mShaderLevel == 1) + // { + // fog_color.mV[VALPHA] = (F32)(log(fog_density) / log(2)); + // } + // F32 water_height = environment.getWaterHeight(); F32 camera_height = LLViewerCamera::getInstance()->getOrigin().mV[2]; diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp index a127f5d43e..229317a3c9 100644 --- a/indra/newview/llfloatergltfasseteditor.cpp +++ b/indra/newview/llfloatergltfasseteditor.cpp @@ -299,7 +299,7 @@ void LLFloaterGLTFAssetEditor::loadFromSelection() setTitle(node->mName); } - LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + // LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); // set but unused for (S32 i = 0; i < mAsset->mScenes.size(); i++) { LL::GLTF::Scene& scene = mAsset->mScenes[i]; diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index c4d4eae860..92e79968a0 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -459,7 +459,7 @@ void LLFloaterImagePreview::onBtnOK() void LLFloaterImagePreview::draw() { LLFloater::draw(); - LLRect r = getRect(); + // LLRect r = getRect(); set but unused if (mRawImagep.notNull()) { diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index a87494062c..2bf13b9317 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -1030,7 +1030,7 @@ void LLSurfacePatch::updateGL() F32 grids_per_patch_edge = (F32)getSurface()->getGridsPerPatchEdge(); LLViewerRegion *regionp = getSurface()->getRegion(); - LLVector3d origin_region = getOriginGlobal() - getSurface()->getOriginGlobal(); + // LLVector3d origin_region = getOriginGlobal() - getSurface()->getOriginGlobal(); // set but not used LLVLComposition* comp = regionp->getComposition(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 919badd217..76b2b4e3a8 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -12063,7 +12063,7 @@ void LLVOAvatar::getAssociatedVolumes(std::vector& volumes) for (const auto& iter : mAttachmentPoints) { LLViewerJointAttachment* attachment = iter.second; - LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_end = attachment->mAttachedObjects.end(); + // LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_end = attachment->mAttachedObjects.end(); // set but not used for (LLViewerObject* attached_object : attachment->mAttachedObjects) {