mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 07:09:03 +00:00
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:
@@ -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.");
|
||||
|
||||
@@ -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, ¶mSize );
|
||||
error = clGetKernelInfo( kernel, CL_KERNEL_FUNCTION_NAME, 0, NULL, ¶mSize );
|
||||
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, ¶mSize );
|
||||
error = clGetKernelInfo( kernel, CL_KERNEL_PROGRAM, 0, NULL, ¶mSize );
|
||||
test_error( error, "Unable to get kernel program param size" );
|
||||
if( paramSize != sizeof( testProgram ) )
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user