aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven van Haastregt <sven.vanhaastregt@arm.com>2023-10-02 17:11:55 +0200
committerGitHub <noreply@github.com>2023-10-02 08:11:55 -0700
commitf39685030f5f72883c0a71400a2423e436870639 (patch)
tree7bb31c09afeade78539c57049c8283be38e42e18
parentb143a990d964a15c72d94998664a81b171192e74 (diff)
downloadOpenCL-CTS-f39685030f5f72883c0a71400a2423e436870639.tar.gz
gl: fix sometimes-uninitialized warning (#1815)
Bail out when hitting the default case, so that we don't attempt to access the uninitialized `error` variable. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
-rw-r--r--test_conformance/gl/test_images_write_common.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test_conformance/gl/test_images_write_common.cpp b/test_conformance/gl/test_images_write_common.cpp
index 4d721296..69d00a1a 100644
--- a/test_conformance/gl/test_images_write_common.cpp
+++ b/test_conformance/gl/test_images_write_common.cpp
@@ -571,6 +571,7 @@ static int test_image_format_write(cl_context context, cl_command_queue queue,
"%s (%s):%d",
GetGLTargetName(target), __FUNCTION__, __FILE__,
__LINE__);
+ return -1;
}
// If there was a problem during creation, make sure it isn't a known