main: fix several 'may be used uninitialized' warnings
authorAndrii Simiklit <andrii.simiklit@globallogic.com>
Mon, 28 Oct 2019 12:23:55 +0000 (14:23 +0200)
committerEric Engestrom <eric@engestrom.ch>
Thu, 31 Oct 2019 10:14:09 +0000 (10:14 +0000)
This patch fixes approximately 39 warnings in 'texcompress_etc.c'
for the release configuration

v2: Fixed by adding the unreachable case to the etc2_rgb8_fetch_texel
       ( Eric Engestrom <eric.engestrom@intel.com> )

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
src/mesa/main/texcompress_etc.c

index b39ab33d36fc6607d29a6c35ac2c9b499e261172..32464f3ca9e41df60473fe452d3ef9aca76ea6a4 100644 (file)
@@ -548,6 +548,8 @@ etc2_rgb8_fetch_texel(const struct etc2_block *block,
       if (punchthrough_alpha)
          dst[3] = 255;
    }
+   else
+      unreachable("unhandled block mode");
 }
 
 static void