Skip to content

Commit 4dd701f

Browse files
committed
sse-dct: silence spurious GCC -Wmaybe-uninitialized in 32x32 IDCT
The m128iS0..m128iS31 registers in ff_hevc_transform_32x32_add_8_sse4 are all unconditionally loaded at function entry before any use, but GCC's path analysis gives up inside this very large inlined function and reports them as possibly-uninitialized. Wrap the function in a GCC-only diagnostic push/ignore/pop to suppress the false positives.
1 parent 79672d9 commit 4dd701f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

libde265/x86/sse-dct.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2909,6 +2909,13 @@ void ff_hevc_transform_16x16_add_10_sse4(uint8_t *_dst, const int16_t *coeffs,
29092909

29102910

29112911
#if HAVE_SSE4_1
2912+
// All m128iS0..m128iS31 are unconditionally loaded at function entry before any
2913+
// use, but GCC's path analysis gives up inside this very large inlined function
2914+
// and emits spurious -Wmaybe-uninitialized warnings for them. Suppress them here.
2915+
#if defined(__GNUC__) && !defined(__clang__)
2916+
#pragma GCC diagnostic push
2917+
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
2918+
#endif
29122919
void ff_hevc_transform_32x32_add_8_sse4(uint8_t *_dst, const int16_t *coeffs,
29132920
ptrdiff_t _stride) {
29142921
uint8_t shift_2nd = 12; // 20 - Bit depth
@@ -5197,6 +5204,9 @@ void ff_hevc_transform_32x32_add_8_sse4(uint8_t *_dst, const int16_t *coeffs,
51975204
}
51985205
}
51995206
}
5207+
#if defined(__GNUC__) && !defined(__clang__)
5208+
#pragma GCC diagnostic pop
5209+
#endif
52005210
#endif
52015211

52025212

0 commit comments

Comments
 (0)