mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Core: Sidestep GCC false-positives
(cherry picked from commit acdb8667b56a43db6eee9a96ad61147bb80ea785) Adds some more fixes for 4.5. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
@@ -2359,6 +2359,10 @@ void Image::initialize_data(const char **p_xpm) {
|
|||||||
} break;
|
} break;
|
||||||
case READING_PIXELS: {
|
case READING_PIXELS: {
|
||||||
int y = line - colormap_size - 1;
|
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++) {
|
for (int x = 0; x < size_width; x++) {
|
||||||
char pixelstr[6] = { 0, 0, 0, 0, 0, 0 };
|
char pixelstr[6] = { 0, 0, 0, 0, 0, 0 };
|
||||||
for (int i = 0; i < pixelchars; i++) {
|
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);
|
_put_pixelb(x, y, pixel_size, data_write, pixel);
|
||||||
}
|
}
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
if (y == (size_height - 1)) {
|
if (y == (size_height - 1)) {
|
||||||
status = DONE;
|
status = DONE;
|
||||||
|
|||||||
Reference in New Issue
Block a user