Skip to content

Commit d3b4d9c

Browse files
committed
minimp3: silence an incorrect -Wstringop-overflow warning from gcc >= 14
Reference issue: #616
1 parent 24cf1eb commit d3b4d9c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/codecs/minimp3/minimp3.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@ static float L3_ldexp_q2(float y, int exp_q2)
651651
return y;
652652
}
653653

654+
#if (defined(__GNUC__) && (__GNUC__ >= 14)) && !defined(__clang__)
655+
#pragma GCC diagnostic push
656+
#pragma GCC diagnostic ignored "-Wstringop-overflow"
657+
#endif
654658
static void L3_decode_scalefactors(const uint8_t *hdr, uint8_t *ist_pos, bs_t *bs, const L3_gr_info_t *gr, float *scf, int ch)
655659
{
656660
static const uint8_t g_scf_partitions[3][28] = {
@@ -712,6 +716,9 @@ static void L3_decode_scalefactors(const uint8_t *hdr, uint8_t *ist_pos, bs_t *b
712716
scf[i] = L3_ldexp_q2(gain, iscf[i] << scf_shift);
713717
}
714718
}
719+
#if (defined(__GNUC__) && (__GNUC__ >= 14)) && !defined(__clang__)
720+
#pragma GCC diagnostic pop
721+
#endif
715722

716723
static const float g_pow43[129 + 16] = {
717724
0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f,

0 commit comments

Comments
 (0)