From fca98a6068c99ada4bd342d49389f25b19cde219 Mon Sep 17 00:00:00 2001 From: Arctis-Fireblight <6182060+Arctis-Fireblight@users.noreply.github.com> Date: Wed, 5 Nov 2025 18:58:44 -0600 Subject: [PATCH] Core: Sidestep GCC false-positives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit acdb8667b56a43db6eee9a96ad61147bb80ea785) Adds some more fixes for 4.5. Co-authored-by: Rémi Verschelde --- core/io/image.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/io/image.cpp b/core/io/image.cpp index 773bb5ef23..7c9fffe108 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -2359,6 +2359,10 @@ void Image::initialize_data(const char **p_xpm) { } break; case READING_PIXELS: { int y = line - colormap_size - 1; +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wstringop-overflow=0" +#endif for (int x = 0; x < size_width; x++) { char pixelstr[6] = { 0, 0, 0, 0, 0, 0 }; for (int i = 0; i < pixelchars; i++) { @@ -2373,6 +2377,9 @@ void Image::initialize_data(const char **p_xpm) { } _put_pixelb(x, y, pixel_size, data_write, pixel); } +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif if (y == (size_height - 1)) { status = DONE;