summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-09-06 20:52:57 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-09-06 20:52:57 -0400
commit2d3c5fb06073807b3c20d22ed426d620451bcade (patch)
tree43d10537a5bb247bb7090ad99b4a166195d98287
parentdc5a805efdd8497ba9043ea6402c217297d19c27 (diff)
parent67c401047a472d579cffe629519090ea8ef5c570 (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer-vlc
-rw-r--r--indra/llcommon/llfasttimer.h11
-rw-r--r--indra/llrender/llimagegl.cpp14
2 files changed, 10 insertions, 15 deletions
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index 2370253078..f56e5596f5 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -296,7 +296,16 @@ LL_FORCE_INLINE BlockTimer::BlockTimer(BlockTimerStatHandle& timer)
{
#if LL_FAST_TIMER_ON
BlockTimerStackRecord* cur_timer_data = LLThreadLocalSingletonPointer<BlockTimerStackRecord>::getInstance();
- if (!cur_timer_data) return;
+ if (!cur_timer_data)
+ {
+ // How likely is it that
+ // LLThreadLocalSingletonPointer<T>::getInstance() will return NULL?
+ // Even without researching, what we can say is that if we exit
+ // without setting mStartTime at all, gcc 4.7 produces (fatal)
+ // warnings about a possibly-uninitialized data member.
+ mStartTime = 0;
+ return;
+ }
TimeBlockAccumulator& accumulator = timer.getCurrentAccumulator();
accumulator.mActiveCount++;
// keep current parent as long as it is active when we are
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 01c1d81823..ebed454271 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -240,15 +240,6 @@ 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: '<anonymous>.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)
@@ -259,11 +250,6 @@ 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)
{