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>
This commit is contained in:
Sven van Haastregt
2023-10-02 17:11:55 +02:00
committed by GitHub
parent b143a990d9
commit f39685030f

View File

@@ -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