1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Core: Sidestep GCC false-positive

This commit is contained in:
Thaddeus Crews
2025-10-17 15:21:57 -05:00
parent 540ea0b96c
commit acdb8667b5
2 changed files with 3 additions and 0 deletions

View File

@@ -30,7 +30,9 @@
#include "geometry_2d.h" #include "geometry_2d.h"
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Walloc-zero")
#include "thirdparty/clipper2/include/clipper2/clipper.h" #include "thirdparty/clipper2/include/clipper2/clipper.h"
GODOT_GCC_WARNING_POP
#include "thirdparty/misc/polypartition.h" #include "thirdparty/misc/polypartition.h"
#define STB_RECT_PACK_IMPLEMENTATION #define STB_RECT_PACK_IMPLEMENTATION
#include "thirdparty/misc/stb_rect_pack.h" #include "thirdparty/misc/stb_rect_pack.h"

View File

@@ -181,6 +181,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
const NodeData *nd = &nodes[0]; const NodeData *nd = &nodes[0];
Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc); 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(); bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty();