From 20cf275d21c0dce569bb3a16393b529c5c9f1c6c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 29 Aug 2016 18:51:32 +0000 Subject: MAINT-5011: Work around gcc 4.7.2 overly (?) picky fatal warning. --- indra/llrender/llimagegl.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/llrender') diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index ebed454271..01c1d81823 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -240,6 +240,15 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat) //---------------------------------------------------------------------------- +#if LL_LINUX +// gcc 4.7.2 produces this error for the following function, which nat has +// been unable to diagnose as an actual problem: +// llimagegl.cpp:247:2: error: '.LLTrace::BlockTimer::mStartTime' +// may be used uninitialized in this function [-Werror=uninitialized] +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" +#endif + static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE_STATS("Image Stats"); // static void LLImageGL::updateStats(F32 current_time) @@ -250,6 +259,11 @@ void LLImageGL::updateStats(F32 current_time) sCurBoundTextureMemory = S32Bytes(0); } +#if LL_LINUX +// In general we do want to know about uninitialized variables! +#pragma GCC diagnostic pop +#endif + //static S32 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) { -- cgit v1.2.3