From fcd11b1c1e893cd2d00ae7b39315ea6a53372d11 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 3 Feb 2017 16:09:09 +0100 Subject: [PATCH] Intialize variables, or GCC complains they might be used w/o initialization. --- indra/llmessage/lltemplatemessagereader.cpp | 2 +- indra/newview/llpanelface.cpp | 2 +- indra/newview/llpanelface.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 700acab092..2ede73852b 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -288,7 +288,7 @@ void LLTemplateMessageReader::getU8(const char *block, const char *var, void LLTemplateMessageReader::getBOOL(const char *block, const char *var, BOOL &b, S32 blocknum ) { - U8 value; + U8 value(0); getData(block, var, &value, sizeof(U8), blocknum); b = (BOOL) value; } diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index d0e916a482..d9f92b5c79 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2331,7 +2331,7 @@ void LLPanelFace::LLSelectedTE::getFace(LLFace*& face_to_return, bool& identical void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, bool& identical_face) { - LLGLenum image_format; + LLGLenum image_format(0); struct LLSelectedTEGetImageFormat : public LLSelectedTEGetFunctor { LLGLenum get(LLViewerObject* object, S32 te_index) diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 20cd2e9535..b36b3ed40c 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -379,7 +379,7 @@ private: ReturnType (LLMaterial::* const MaterialGetFunc)() const > static void getTEMaterialValue(DataType& data_to_return, bool& identical,DataType default_value) { - DataType data_value; + DataType data_value = default_value; struct GetTEMaterialVal : public LLSelectedTEGetFunctor { GetTEMaterialVal(DataType default_value) : _default(default_value) {} @@ -412,7 +412,7 @@ private: ReturnType (LLTextureEntry::* const TEGetFunc)() const > static void getTEValue(DataType& data_to_return, bool& identical, DataType default_value) { - DataType data_value; + DataType data_value = default_value; struct GetTEVal : public LLSelectedTEGetFunctor { GetTEVal(DataType default_value) : _default(default_value) {}