Skip to content

Commit 816ec99

Browse files
authored
Merge pull request #111771 from Repiteo/core/suppress-gcc-false-positive
Core: Sidestep GCC false-positive
2 parents 540ea0b + acdb866 commit 816ec99

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

core/math/geometry_2d.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030

3131
#include "geometry_2d.h"
3232

33+
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Walloc-zero")
3334
#include "thirdparty/clipper2/include/clipper2/clipper.h"
35+
GODOT_GCC_WARNING_POP
3436
#include "thirdparty/misc/polypartition.h"
3537
#define STB_RECT_PACK_IMPLEMENTATION
3638
#include "thirdparty/misc/stb_rect_pack.h"

scene/resources/packed_scene.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
181181
const NodeData *nd = &nodes[0];
182182

183183
Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc);
184+
ret_nodes[0] = nullptr; // Sidesteps "maybe uninitialized" false-positives on GCC.
184185

185186
bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty();
186187

0 commit comments

Comments
 (0)