diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-14 15:31:42 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-14 15:31:42 +0200 |
commit | c495eb5102278a110c14bbffbf833ed436d1594d (patch) | |
tree | defb692755221bdbc18a37a24c56da84c823ae01 | |
parent | c78be12f429cfaab5fd1bfd35dab4c37a4f528dc (diff) | |
parent | efdff9cbc250d91dd91f8b0d1e3265a874e40e6f (diff) | |
download | redot-engine-c495eb5102278a110c14bbffbf833ed436d1594d.tar.gz |
Merge pull request #80615 from akien-mga/gcc-fix-Wmaybe-uninitialized-warnings
Fix GCC `-Wmaybe-uninitialized` warnings
-rw-r--r-- | core/io/remote_filesystem_client.h | 4 | ||||
-rw-r--r-- | platform/linuxbsd/x11/gl_manager_x11.h | 8 | ||||
-rw-r--r-- | tests/servers/test_navigation_server_3d.h | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/core/io/remote_filesystem_client.h b/core/io/remote_filesystem_client.h index 42eba98eb1..fcb5c1cfc3 100644 --- a/core/io/remote_filesystem_client.h +++ b/core/io/remote_filesystem_client.h @@ -44,8 +44,8 @@ protected: String _get_cache_path() { return cache_path; } struct FileCache { String path; // Local path (as in "folder/to/file.png") - uint64_t server_modified_time; // MD5 checksum. - uint64_t modified_time; + uint64_t server_modified_time = 0; // MD5 checksum. + uint64_t modified_time = 0; }; virtual bool _is_configured() { return !cache_path.is_empty(); } // Can be re-implemented per platform. If so, feel free to ignore get_cache_path() diff --git a/platform/linuxbsd/x11/gl_manager_x11.h b/platform/linuxbsd/x11/gl_manager_x11.h index 59e20fec45..d3a25506a8 100644 --- a/platform/linuxbsd/x11/gl_manager_x11.h +++ b/platform/linuxbsd/x11/gl_manager_x11.h @@ -74,17 +74,17 @@ private: }; struct GLDisplay { - GLDisplay() { context = nullptr; } + GLDisplay() {} ~GLDisplay(); GLManager_X11_Private *context = nullptr; - ::Display *x11_display; - XVisualInfo x_vi; + ::Display *x11_display = nullptr; + XVisualInfo x_vi = {}; }; // just for convenience, window and display struct struct XWinDisp { ::Window x11_window; - ::Display *x11_display; + ::Display *x11_display = nullptr; } _x_windisp; LocalVector<GLWindow> _windows; diff --git a/tests/servers/test_navigation_server_3d.h b/tests/servers/test_navigation_server_3d.h index 8ea69ec67c..a116559cb2 100644 --- a/tests/servers/test_navigation_server_3d.h +++ b/tests/servers/test_navigation_server_3d.h @@ -423,6 +423,7 @@ TEST_SUITE("[Navigation]") { navigation_server->free(map); } +#ifndef DISABLE_DEPRECATED // This test case uses only public APIs on purpose - other test cases use simplified baking. // FIXME: Remove once deprecated `region_bake_navigation_mesh()` is removed. TEST_CASE("[NavigationServer3D][SceneTree][DEPRECATED] Server should be able to bake map correctly") { @@ -470,6 +471,7 @@ TEST_SUITE("[Navigation]") { memdelete(mesh_instance); memdelete(node_3d); } +#endif // DISABLE_DEPRECATED // This test case uses only public APIs on purpose - other test cases use simplified baking. TEST_CASE("[NavigationServer3D][SceneTree] Server should be able to bake map correctly") { |