diff options
author | Simon McVittie <smcv@debian.org> | 2019-09-06 11:41:04 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2020-03-10 11:31:14 +0000 |
commit | f0e571a0e04d87874fb7c7884389486794f902d5 (patch) | |
tree | c586151af418c5b6e23406cb0b1ffb5456fa0ef3 | |
parent | 95342464a8912861f43f9aa3addf4f48a0518d8c (diff) | |
download | cogl-f0e571a0e04d87874fb7c7884389486794f902d5.tar.gz |
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>
-rw-r--r-- | cogl/driver/gl/gles/cogl-driver-gles.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |