Skip to content

Commit c495eb5

Browse files
committed
Merge pull request #80615 from akien-mga/gcc-fix-Wmaybe-uninitialized-warnings
Fix GCC `-Wmaybe-uninitialized` warnings
2 parents c78be12 + efdff9c commit c495eb5

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

core/io/remote_filesystem_client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class RemoteFilesystemClient {
4444
String _get_cache_path() { return cache_path; }
4545
struct FileCache {
4646
String path; // Local path (as in "folder/to/file.png")
47-
uint64_t server_modified_time; // MD5 checksum.
48-
uint64_t modified_time;
47+
uint64_t server_modified_time = 0; // MD5 checksum.
48+
uint64_t modified_time = 0;
4949
};
5050
virtual bool _is_configured() { return !cache_path.is_empty(); }
5151
// Can be re-implemented per platform. If so, feel free to ignore get_cache_path()

platform/linuxbsd/x11/gl_manager_x11.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ class GLManager_X11 {
7474
};
7575

7676
struct GLDisplay {
77-
GLDisplay() { context = nullptr; }
77+
GLDisplay() {}
7878
~GLDisplay();
7979
GLManager_X11_Private *context = nullptr;
80-
::Display *x11_display;
81-
XVisualInfo x_vi;
80+
::Display *x11_display = nullptr;
81+
XVisualInfo x_vi = {};
8282
};
8383

8484
// just for convenience, window and display struct
8585
struct XWinDisp {
8686
::Window x11_window;
87-
::Display *x11_display;
87+
::Display *x11_display = nullptr;
8888
} _x_windisp;
8989

9090
LocalVector<GLWindow> _windows;

tests/servers/test_navigation_server_3d.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ TEST_SUITE("[Navigation]") {
423423
navigation_server->free(map);
424424
}
425425

426+
#ifndef DISABLE_DEPRECATED
426427
// This test case uses only public APIs on purpose - other test cases use simplified baking.
427428
// FIXME: Remove once deprecated `region_bake_navigation_mesh()` is removed.
428429
TEST_CASE("[NavigationServer3D][SceneTree][DEPRECATED] Server should be able to bake map correctly") {
@@ -470,6 +471,7 @@ TEST_SUITE("[Navigation]") {
470471
memdelete(mesh_instance);
471472
memdelete(node_3d);
472473
}
474+
#endif // DISABLE_DEPRECATED
473475

474476
// This test case uses only public APIs on purpose - other test cases use simplified baking.
475477
TEST_CASE("[NavigationServer3D][SceneTree] Server should be able to bake map correctly") {

0 commit comments

Comments
 (0)