[Piglit] [PATCH v3 1/2] tests/cl: Fix pointer warning

Dylan Baker dylan at pnwbakers.com
Tue May 17 20:10:51 UTC 2016


clCreatProgramWithBinary expects a "const unsigned char **", but the code
passes an "unsighed char **". This is a particular kind of messiness
that is hard to fix, so just cast when passing into
clCreateProgramWithBinary.

Thanks to idr and Matt for help getting this right.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/cl/api/create-program-with-binary.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/cl/api/create-program-with-binary.c b/tests/cl/api/create-program-with-binary.c
index 4873b76..2a7894e 100644
--- a/tests/cl/api/create-program-with-binary.c
+++ b/tests/cl/api/create-program-with-binary.c
@@ -119,7 +119,8 @@ static cl_program create_binary_program(const piglit_cl_context ctx)
 
 	binary_program = clCreateProgramWithBinary (cl_ctx, ctx->num_devices,
 						      ctx->device_ids,
-						      sizes, binaries,
+						      sizes,
+						      (const unsigned char **) binaries,
 						      NULL,
 						      &errNo);
 
-- 
2.8.2



More information about the Piglit mailing list