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

2016-05-17 Thread Serge Martin
On Tuesday 17 May 2016 13:10:51 Dylan Baker wrote:
> 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 

Reviewed-by: Serge Martin 

> ---
>  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,
> );

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


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

2016-05-17 Thread Dylan Baker
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 
---
 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,
  );
 
-- 
2.8.2

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit