From cfcbd6fc5458218090b6986e7f3a818135d73aa9 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Sun, 7 Jan 2024 18:45:08 +0100 Subject: [PATCH] Linux: selectively disable a few compiler warnings that are most likely bogus --- indra/newview/llface.cpp | 11 +++++++++++ indra/newview/llfasttimerview.cpp | 23 ++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index a1d0b920d7..4775686fc0 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1995,7 +1995,18 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, while (src < end) { LLVector4a normal; +// GCC12 warning: maybe-uninitialized - probably bogus +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif +// mat_normal.rotate(*src++, normal); +// GCC12 warning: maybe-uninitialized - probably bogus +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic pop +#endif +// normal.store4a(normals); normals += 4; } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 5cb2c89172..d710eafb68 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1223,9 +1223,20 @@ void LLFastTimerView::drawLegend() S32 scroll_offset = 0; // element's y offset from top of the inner scroll's rect ft_display_idx.clear(); std::map display_line; +// GCC12 warning: nonnull - probably bogus +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" +#endif +// for (block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME); it != block_timer_tree_df_iterator_t(); ++it) +// GCC12 warning: nonnull - probably bogus +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic pop +#endif +// { BlockTimerStatHandle* idp = (*it); // Needed to figure out offsets and parenting @@ -1338,10 +1349,20 @@ void LLFastTimerView::generateUniqueColors() sTimerColors[FTM_FRAME.getIndex()] = LLColor4::grey; F32 hue = 0.f; - +// GCC12 warning: nonnull - probably bogus +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" +#endif +// for (block_timer_tree_df_iterator_t it = LLTrace::begin_block_timer_tree_df(FTM_FRAME); it != block_timer_tree_df_iterator_t(); ++it) +// GCC12 warning: nonnull - probably bogus +#if defined(__GNUC__) && (__GNUC__ >= 12) +#pragma GCC diagnostic pop +#endif +// { BlockTimerStatHandle* idp = (*it);