SDL_mixer: minimp3: silence an incorrect -Wstringop-overflow warning from gcc >= 14 (d3b4d)

From d3b4d9cf9cae405ef3e0c15e5203f3aa14657c67 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 25 Jul 2025 00:11:50 +0300
Subject: [PATCH] minimp3: silence an incorrect -Wstringop-overflow warning
 from gcc >= 14

Reference issue: https://github.com/libsdl-org/SDL_mixer/issues/616
---
 src/codecs/minimp3/minimp3.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/codecs/minimp3/minimp3.h b/src/codecs/minimp3/minimp3.h
index 3220ae1a8..5442f5910 100644
--- a/src/codecs/minimp3/minimp3.h
+++ b/src/codecs/minimp3/minimp3.h
@@ -651,6 +651,10 @@ static float L3_ldexp_q2(float y, int exp_q2)
     return y;
 }
 
+#if (defined(__GNUC__) && (__GNUC__ >= 14)) && !defined(__clang__)
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
 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)
 {
     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
         scf[i] = L3_ldexp_q2(gain, iscf[i] << scf_shift);
     }
 }
+#if (defined(__GNUC__) && (__GNUC__ >= 14)) && !defined(__clang__)
+    #pragma GCC diagnostic pop
+#endif
 
 static const float g_pow43[129 + 16] = {
     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,