diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-01 22:33:39 +0200 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-02 01:59:26 +0200 |
commit | 9c63ab99f0a505b0f60079bb30cc453b4415fddc (patch) | |
tree | 7014cb6e8c2e71a0583656f76d3d37d719a74fb0 /modules/squish | |
parent | dac150108ab3c1f41d5fd86cc6853f883064caaf (diff) |
Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'modules/squish')
-rw-r--r-- | modules/squish/image_compress_squish.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp index 29073a8499..072f18b990 100644 --- a/modules/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -91,7 +91,7 @@ void image_compress_squish(Image *p_image, Image::CompressSource p_source) { if (p_image->get_format() <= Image::FORMAT_RGBA8) { int squish_comp = squish::kColourRangeFit; - Image::Format target_format; + Image::Format target_format = Image::FORMAT_RGBA8; Image::DetectChannels dc = p_image->get_detected_channels(); @@ -140,6 +140,10 @@ void image_compress_squish(Image *p_image, Image::CompressSource p_source) { squish_comp |= squish::kDxt5; } break; + default: { + ERR_PRINT("Unknown image format, defaulting to RGBA8"); + break; + } } PoolVector<uint8_t> data; |