You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix various -Wmaybe-uninitialized warnings from GCC 12.2.1
Not sure why I didn't get those before, it may be due to upstream changes (12.2.1 is a moving target, it's basically 12.3-dev), or simply rebuilding Godot from scratch with different options.
This commit is contained in:
@@ -743,7 +743,7 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i
|
||||
r_attrib_element_size = 0;
|
||||
r_skin_element_size = 0;
|
||||
|
||||
uint32_t *size_accum;
|
||||
uint32_t *size_accum = nullptr;
|
||||
|
||||
for (int i = 0; i < RS::ARRAY_MAX; i++) {
|
||||
r_offsets[i] = 0; // Reset
|
||||
@@ -847,8 +847,12 @@ void RenderingServer::mesh_surface_make_offsets_from_format(uint32_t p_format, i
|
||||
}
|
||||
}
|
||||
|
||||
r_offsets[i] = (*size_accum);
|
||||
(*size_accum) += elem_size;
|
||||
if (size_accum != nullptr) {
|
||||
r_offsets[i] = (*size_accum);
|
||||
(*size_accum) += elem_size;
|
||||
} else {
|
||||
r_offsets[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user