Fix warnings reported by -Wconversion-null (#603)

Fix error reporting in clFillImage as a result.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
Kévin Petit
2020-02-21 12:21:53 +00:00
committed by GitHub
parent 170784c193
commit 3f11868e11
11 changed files with 21 additions and 21 deletions

View File

@@ -58,7 +58,7 @@ int test_create_context_from_type(cl_device_id deviceID, cl_context context, cl_
cl_context_properties properties[3] = {
(cl_context_properties)CL_CONTEXT_PLATFORM,
(cl_context_properties)platform,
NULL
0
};
context_to_test = clCreateContextFromType(properties, type, notify_callback, NULL, &error);
@@ -68,7 +68,7 @@ int test_create_context_from_type(cl_device_id deviceID, cl_context context, cl_
return -1;
}
queue_to_test = clCreateCommandQueue(context_to_test, deviceID, NULL, &error);
queue_to_test = clCreateCommandQueue(context_to_test, deviceID, 0, &error);
test_error(error, "clCreateCommandQueue failed");
if (queue_to_test == NULL) {
log_error("clCreateCommandQueue returned NULL, but error was CL_SUCCESS.");

View File

@@ -111,7 +111,7 @@ int test_get_kernel_info(cl_device_id deviceID, cl_context context, cl_command_q
return -1;
}
error = clGetKernelInfo( kernel, CL_KERNEL_FUNCTION_NAME, NULL, 0, &paramSize );
error = clGetKernelInfo( kernel, CL_KERNEL_FUNCTION_NAME, 0, NULL, &paramSize );
test_error( error, "Unable to get kernel function name param size" );
if( paramSize != strlen( "sample_test" ) + 1 )
{
@@ -157,7 +157,7 @@ int test_get_kernel_info(cl_device_id deviceID, cl_context context, cl_command_q
test_error( error, "Unable to get kernel reference count" );
error = clGetKernelInfo( kernel, CL_KERNEL_PROGRAM, NULL, 0, &paramSize );
error = clGetKernelInfo( kernel, CL_KERNEL_PROGRAM, 0, NULL, &paramSize );
test_error( error, "Unable to get kernel program param size" );
if( paramSize != sizeof( testProgram ) )
{

View File

@@ -109,7 +109,7 @@ int test_queue_properties(cl_device_id deviceID, cl_context context, cl_command_
clKernelWrapper kernel;
size_t strSize;
std::string strExt(0, '\0');
cl_queue_properties_khr device_props = NULL;
cl_queue_properties_khr device_props = 0;
cl_queue_properties_khr queue_prop_def[] = { CL_QUEUE_PROPERTIES, 0, 0 };
// Query extension