Skip to content

Commit 74e1eb7

Browse files
committed
Core: Suppress GCC false-positive
1 parent 540ea0b commit 74e1eb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scene/resources/packed_scene.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ static Node *_find_node_by_id(Node *p_owner, Node *p_node, int32_t p_id) {
144144
return nullptr;
145145
}
146146

147+
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Wmaybe-uninitialized") // False-positive on `ret_nodes`.
148+
147149
Node *SceneState::instantiate(GenEditState p_edit_state) const {
148150
// Nodes where instantiation failed (because something is missing.)
149151
List<Node *> stray_instances;
@@ -702,6 +704,8 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
702704
return ret_nodes[0];
703705
}
704706

707+
GODOT_GCC_WARNING_POP
708+
705709
Variant SceneState::make_local_resource(Variant &p_value, const SceneState::NodeData &p_node_data, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_sub_scene, Node *p_node, const StringName p_sname, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_scene, int p_i, Node **p_ret_nodes, SceneState::GenEditState p_edit_state) const {
706710
Ref<Resource> res = p_value;
707711
if (res.is_null() || !res->is_local_to_scene()) {

0 commit comments

Comments
 (0)