More unused-but-set fixes. Also remove Linux exclusion

Linux was suppressing these issues rather than fixing them.
master
Beq 2025-09-08 21:45:25 +01:00
parent 41d0f27888
commit 710cbf564d
6 changed files with 13 additions and 12 deletions

View File

@ -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)

View File

@ -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); // <FS:Beq/> set but unused
// LLColor3 fog_color_linear = linearColor3(fog_color); // <FS:Beq/> 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));
}
// <FS:Beq> set but unused "fog_color"
// if (mShaderLevel == 1)
// {
// fog_color.mV[VALPHA] = (F32)(log(fog_density) / log(2));
// }
// </FS:Beq>
F32 water_height = environment.getWaterHeight();
F32 camera_height = LLViewerCamera::getInstance()->getOrigin().mV[2];

View File

@ -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); // <FS:Beq/> set but unused
for (S32 i = 0; i < mAsset->mScenes.size(); i++)
{
LL::GLTF::Scene& scene = mAsset->mScenes[i];

View File

@ -459,7 +459,7 @@ void LLFloaterImagePreview::onBtnOK()
void LLFloaterImagePreview::draw()
{
LLFloater::draw();
LLRect r = getRect();
// LLRect r = getRect(); <FS:Beq/> set but unused
if (mRawImagep.notNull())
{

View File

@ -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(); // <FS:Beq/> set but not used
LLVLComposition* comp = regionp->getComposition();

View File

@ -12063,7 +12063,7 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& 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(); // <FS:Beq/> set but not used
for (LLViewerObject* attached_object : attachment->mAttachedObjects)
{