summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-12-17 12:42:24 +0100
committerRémi Verschelde <rverschelde@gmail.com>2018-12-17 12:42:26 +0100
commit4d546164e749871c96b77f6c894a47302827b796 (patch)
tree0d9236f841b250bac3e3f421b18e81bd3933d732 /scene
parent28b10ea66821e8de6c387a83c0218e006566079d (diff)
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] ```
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/bit_mask.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index 56b236d03b..587ab73dce 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -432,8 +432,8 @@ static void fill_bits(const BitMap *p_src, Ref<BitMap> &p_map, const Point2i &p_
int stack_size = 0;
Point2i pos = p_pos;
- int next_i;
- int next_j;
+ int next_i = 0;
+ int next_j = 0;
bool reenter = true;
bool popped = false;