diff --git a/core/io/image.cpp b/core/io/image.cpp index 57408dc8034..eb5df23927a 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -2338,6 +2338,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++) { @@ -2352,6 +2356,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; diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 9dcb7cecae4..b9e698d5294 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -108,6 +108,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const { const NodeData *nd = &nodes[0]; Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc); + ret_nodes[0] = nullptr; // Sidesteps "maybe uninitialized" false-positives on GCC. bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty();