mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Re-enabling narrowing errors (#1144)
Fixes narrowing conversion build errors in test_common Removing disable of narrowing errors in main CMakeLists.txt and moving it down to specific test_conformance suite's CMakeLists.txt where there are many more build errors revealed from this fix. Fixes a few simple issues under test_conformance in the process. Contributes #787 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> --------- Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
This commit is contained in:
@@ -175,7 +175,7 @@ struct CommandBufferPrintfTest : public BasicCommandBufferTest
|
||||
nullptr, &error);
|
||||
test_error(error, "clCreateBuffer failed");
|
||||
|
||||
cl_int offset[] = { 0, max_pattern_length };
|
||||
cl_uint offset[] = { 0, max_pattern_length };
|
||||
off_mem =
|
||||
clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
|
||||
sizeof(offset), offset, &error);
|
||||
@@ -274,7 +274,9 @@ struct CommandBufferPrintfTest : public BasicCommandBufferTest
|
||||
&pattern[0], 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueWriteBuffer failed");
|
||||
|
||||
cl_int offset[] = { 0, pattern.size() - 1 };
|
||||
test_assert_error(pattern.size() - 1 <= CL_UINT_MAX,
|
||||
"pattern.size() - 1 does not fit in a cl_uint");
|
||||
cl_uint offset[] = { 0, static_cast<cl_uint>(pattern.size() - 1) };
|
||||
error = clEnqueueWriteBuffer(queue, off_mem, CL_TRUE, 0, sizeof(offset),
|
||||
offset, 0, nullptr, nullptr);
|
||||
test_error(error, "clEnqueueWriteBuffer failed");
|
||||
|
||||
@@ -115,7 +115,7 @@ struct CreateCommandBufferRepeatedProperties : public BasicCommandBufferTest
|
||||
TEST_FAIL);
|
||||
|
||||
cl_command_buffer_properties_khr invalid_properties[3] = {
|
||||
CL_COMMAND_BUFFER_FLAGS_KHR, CL_INVALID_PROPERTY, 0
|
||||
CL_COMMAND_BUFFER_FLAGS_KHR, (cl_command_buffer_properties_khr)-1, 0
|
||||
};
|
||||
|
||||
command_buffer =
|
||||
|
||||
@@ -165,7 +165,8 @@ struct CreateInvalidMultiDeviceProperty : public SemaphoreTestBase
|
||||
test_error(err, "Unable to get maximal number of compute units");
|
||||
|
||||
cl_device_partition_property partitionProp[] = {
|
||||
CL_DEVICE_PARTITION_EQUALLY, maxComputeUnits / 2, 0
|
||||
CL_DEVICE_PARTITION_EQUALLY,
|
||||
static_cast<cl_device_partition_property>(maxComputeUnits / 2), 0
|
||||
};
|
||||
|
||||
cl_uint deviceCount = 0;
|
||||
@@ -238,7 +239,8 @@ struct CreateInvalidDevice : public SemaphoreTestBase
|
||||
test_error(err, "Unable to get maximal number of compute units");
|
||||
|
||||
cl_device_partition_property partitionProp[] = {
|
||||
CL_DEVICE_PARTITION_EQUALLY, maxComputeUnits / 2, 0
|
||||
CL_DEVICE_PARTITION_EQUALLY,
|
||||
static_cast<cl_device_partition_property>(maxComputeUnits / 2), 0
|
||||
};
|
||||
|
||||
cl_uint deviceCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user