summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2019-09-06 11:41:04 +0100
committerSimon McVittie <smcv@debian.org>2020-03-10 11:31:14 +0000
commitf0e571a0e04d87874fb7c7884389486794f902d5 (patch)
treec586151af418c5b6e23406cb0b1ffb5456fa0ef3
parent95342464a8912861f43f9aa3addf4f48a0518d8c (diff)
downloadcogl-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.c1
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;
}