[cogl/wip/smcv/uninitialized: 1/2] gles: Reassure compiler that uninitialized variables are not reached
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/smcv/uninitialized: 1/2] gles: Reassure compiler that uninitialized variables are not reached
- Date: Tue, 10 Mar 2020 11:32:23 +0000 (UTC)
commit f0e571a0e04d87874fb7c7884389486794f902d5
Author: Simon McVittie <smcv debian org>
Date: Fri Sep 6 11:41:04 2019 +0100
gles: Reassure compiler that uninitialized variables are not reached
gcc 9 detects that if we exit this switch due to an unsupported
pixel format, the variables that it sets will remain uninitialized,
causing compilation with -Werror=uninitialized to fail. Treat invalid
pixel formats the same as the ones that are already unsupported.
Signed-off-by: Simon McVittie <smcv debian org>
cogl/driver/gl/gles/cogl-driver-gles.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
index e94449f4..d8d1d0ad 100644
--- a/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -201,6 +201,7 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
case COGL_PIXEL_FORMAT_ANY:
case COGL_PIXEL_FORMAT_YUV:
+ default:
g_assert_not_reached ();
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]