From f39685030f5f72883c0a71400a2423e436870639 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Mon, 2 Oct 2023 17:11:55 +0200 Subject: [PATCH] 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 --- test_conformance/gl/test_images_write_common.cpp | 1 + 1 file changed, 1 insertion(+) 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