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:
ellnor01
2024-10-08 17:54:32 +01:00
committed by GitHub
parent 7d86714c10
commit 617e7cb233
26 changed files with 100 additions and 60 deletions

View File

@@ -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");

View File

@@ -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 =