Address g++ compiler warnings, so we can move to g++14

Avoid uninitialized variable warnings on Linux/g++ by initializing translation_override in LLGLTFLoader.

Force the empty callback in LLPanelRegionTerrainInfo to decay to a function pointer to avoid warnings on Linux.

Remove initialization of mViewerObject in LLReflectionMap.h so that we are standards compliant.

(also paired with commit on fs-build-variables to ignore non-null warnings due to gcc stupidity)
master
Beq 2025-08-09 18:59:33 +01:00
parent c14d0d50b1
commit 0b258ac678
3 changed files with 3 additions and 3 deletions

View File

@ -1460,7 +1460,7 @@ void LLGLTFLoader::buildOverrideMatrix(LLJointData& viewer_data, joints_data_map
translated_joint = glm::inverse(parent_support_rest) * gltf_joint_rest_pose;
}
glm::vec3 translation_override;
glm::vec3 translation_override(0.0f); // <FS:Beq/> Avoid uninitialized variable warning in gcc
glm::vec3 skew;
glm::vec3 scale;
glm::vec4 perspective;

View File

@ -2190,7 +2190,7 @@ void LLPanelRegionTerrainInfo::initMaterialCtrl(LLTextureCtrl*& ctrl, const std:
if (!ctrl) return;
// consume cancel events, otherwise they will trigger commit callbacks
ctrl->setOnCancelCallback([](LLUICtrl* ctrl, const LLSD& param) {});
ctrl->setOnCancelCallback(+[](LLUICtrl* ctrl, const LLSD& param) {}); // <FS:Beq/> force the empty callback to decay to a function pointer, which triggers warnings on gcc
ctrl->setCommitCallback(
[this, index](LLUICtrl* ctrl, const LLSD& param)
{

View File

@ -131,7 +131,7 @@ public:
LLSpatialGroup* mGroup = nullptr;
// viewer object this probe is tracking (if any)
LLPointer<LLViewerObject> mViewerObject = nullptr;
LLPointer<LLViewerObject> mViewerObject; // <FS:Beq/> remove initialisation here, leave it to the pointer class and avoid issues
// what priority should this probe have (higher is higher priority)
// currently only 0 or 1