From 712eb4f9883de3747242046ee0034c72117fe664 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Fri, 3 Mar 2023 13:29:29 +0000 Subject: [PATCH] gl: Fix array size expression (#1610) `sizes` is a pointer argument, so the expression does not compute the presumably intended number of elements in `sizes`. Fixes a `-Wsizeof-pointer-div` warning. Signed-off-by: Sven van Haastregt --- test_conformance/gl/test_images_read_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_conformance/gl/test_images_read_common.cpp b/test_conformance/gl/test_images_read_common.cpp index dc6ad9fa..d12936e8 100644 --- a/test_conformance/gl/test_images_read_common.cpp +++ b/test_conformance/gl/test_images_read_common.cpp @@ -786,7 +786,7 @@ int test_images_read_common(cl_device_id device, cl_context context, // Note a successful format test, if we passed every size. - if (sidx == sizeof(sizes) / sizeof(sizes[0])) + if (sidx == nsizes) { log_info("passed: Image read test for GL format %s : %s : %s " ": %s\n\n",