diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-04 13:04:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-04 13:08:41 +0200 |
commit | f48ee838e7b88a630f9dea76b697eb4626d69abc (patch) | |
tree | 83d392f8e6e0773b80059ea6d9b865fed5cb8020 /main | |
parent | 156c4eab022a52ff2415cd4b2dd3a3b2034c18d1 (diff) |
Fix GCC 8 warnings about potentially unitialized variables
Fixes the following GCC 8 warnings:
```
core/image.cpp:730:44: warning: 'mip1_weight' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:293:20: warning: 'mip2' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/image.cpp:293:20: warning: 'mip1' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/audio_stream_preview.cpp:58:19: warning: 'vmax' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/audio_stream_preview.cpp:85:19: warning: 'vmin' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/editor_themes.cpp:306:53: warning: 'preset_contrast' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/plugins/animation_blend_space_2d_editor.cpp:459:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
editor/plugins/animation_blend_space_2d_editor.cpp:443:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
main/tests/test_oa_hash_map.cpp:57:29: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
modules/csg/csg.cpp:764:40: warning: 'max_angle' may be used uninitialized in this function [-Wmaybe-uninitialized]
modules/csg/csg_shape.cpp:1945:3: warning: 'face_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1593:8: warning: 'cone_aperture' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/3d/voxel_light_baker.cpp:1592:6: warning: 'cone_dir_count' may be used uninitialized in this function [-Wmaybe-uninitialized]
scene/animation/animation_blend_space_2d.cpp:471:8: warning: 'mind' may be used uninitialized in this function [-Wmaybe-uninitialized]
core/os/memory.cpp:94: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
core/os/memory.cpp:95: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
core/os/memory.cpp:98: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
```
Diffstat (limited to 'main')
-rw-r--r-- | main/tests/test_oa_hash_map.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/tests/test_oa_hash_map.cpp b/main/tests/test_oa_hash_map.cpp index 0e34faace7..26e728d3aa 100644 --- a/main/tests/test_oa_hash_map.cpp +++ b/main/tests/test_oa_hash_map.cpp @@ -48,7 +48,7 @@ MainLoop *test() { map.set(1337, 21); map.set(42, 11880); - int value; + int value = 0; map.lookup(42, value); OS::get_singleton()->print("capacity %d\n", map.get_capacity()); |