mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix various Wformat warnings (#2135)
test_copy_1D.cpp: num_mip_levels is a cl_uint, so don't cast and just print using `%u`. test_pipe_info.cpp: arg_type_qualifier is a 64-bit wide bitfield, so print in hexadecimal format using the correct length modifier. test_device_partition.cpp: it is not clear what the bit width of `cl_device_partition_property` should be, so cast the operands to align with the format specifiers. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
d3b9520adc
commit
e360d2de5b
@@ -193,7 +193,8 @@ int test_svm_enqueue_api(cl_device_id deviceID, cl_context c, cl_command_queue q
|
||||
for (size_t j = 0; j < data_size; ++j)
|
||||
{
|
||||
if (dst_ptr[j] != src_ptr[j]) {
|
||||
log_error("Invalid data at index %ld, dst_ptr %d, src_ptr %d\n", j, dst_ptr[j], src_ptr[j]);
|
||||
log_error("Invalid data at index %zu, dst_ptr %d, src_ptr %d\n", j,
|
||||
dst_ptr[j], src_ptr[j]);
|
||||
return TEST_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -291,8 +292,10 @@ int test_svm_enqueue_api(cl_device_id deviceID, cl_context c, cl_command_queue q
|
||||
//check if number of SVM pointers returned in the callback matches with expected
|
||||
if (data.num_svm_pointers != buffers.size())
|
||||
{
|
||||
log_error("Invalid number of SVM pointers returned in the callback, expected: %ld, got: %d\n", buffers.size(), data.num_svm_pointers);
|
||||
return TEST_FAIL;
|
||||
log_error("Invalid number of SVM pointers returned in the callback, "
|
||||
"expected: %zu, got: %d\n",
|
||||
buffers.size(), data.num_svm_pointers);
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
//check if pointers returned in callback are correct
|
||||
@@ -300,8 +303,9 @@ int test_svm_enqueue_api(cl_device_id deviceID, cl_context c, cl_command_queue q
|
||||
{
|
||||
if (data.svm_pointers[i] != buffers[i])
|
||||
{
|
||||
log_error("Invalid SVM pointer returned in the callback, idx: %ld\n", i);
|
||||
return TEST_FAIL;
|
||||
log_error("Invalid SVM pointer returned in the callback, idx: %zu\n",
|
||||
i);
|
||||
return TEST_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user