From 4d546164e749871c96b77f6c894a47302827b796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 17 Dec 2018 12:42:24 +0100 Subject: Fix maybe-uninitialized warnings from GCC 4.8.x Fixes the following warnings in `p=server target=release_debug` builds on Travis CI: ``` ./core/os/memory.h: In function 'MainLoop* TestOAHashMap::test()': ./core/os/memory.h:108:111: warning: 'dummy' may be used uninitialized in this function [-Wmaybe-uninitialized] #define memnew_placement(m_placement, m_class) _post_initialize(new (m_placement, sizeof(m_class), "") m_class) ^ main/tests/test_oa_hash_map.cpp:98:7: note: 'dummy' was declared here int dummy; ^ scene/resources/bit_mask.cpp:447:3: warning: 'next_i' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/resources/bit_mask.cpp:448:4: warning: 'next_j' may be used uninitialized in this function [-Wmaybe-uninitialized] ``` --- main/tests/test_oa_hash_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/tests') diff --git a/main/tests/test_oa_hash_map.cpp b/main/tests/test_oa_hash_map.cpp index deaba285cf..984a661aaa 100644 --- a/main/tests/test_oa_hash_map.cpp +++ b/main/tests/test_oa_hash_map.cpp @@ -95,7 +95,7 @@ MainLoop *test() { // stress test / test for issue #22928 { OAHashMap map; - int dummy; + int dummy = 0; const int N = 1000; uint32_t *keys = new uint32_t[N]; -- cgit v1.2.3