Skip to content

Commit

Permalink
cl_khr_mutable_dispatch: fix -Wformat warnings (#2071)
Browse files Browse the repository at this point in the history
Printing of a `size_t` requires the `%zu` specifier.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
  • Loading branch information
svenvh committed Sep 6, 2024
1 parent b57f90e commit c32a767
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ struct MutableDispatchLocalArguments : public MutableDispatchArgumentsTest
for (size_t i = 0; i < number_of_ints; i++)
if (constant_data[i] != result_data[i])
{
log_error("Data failed to verify: constant_data[%d]=%d != "
"result_data[%d]=%d\n",
log_error("Data failed to verify: constant_data[%zu]=%d != "
"result_data[%zu]=%d\n",
i, constant_data[i], i, result_data[i]);
return TEST_FAIL;
}
Expand Down Expand Up @@ -457,8 +457,8 @@ struct MutableDispatchPODArguments : public MutableDispatchArgumentsTest
for (size_t i = 0; i < number_of_ints; i++)
if (constant_data[i] != result_data[i])
{
log_error("Data failed to verify: constant_data[%d]=%d != "
"result_data[%d]=%d\n",
log_error("Data failed to verify: constant_data[%zu]=%d != "
"result_data[%zu]=%d\n",
i, constant_data[i], i, result_data[i]);
return TEST_FAIL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ struct MutableDispatchGlobalOffset : InfoMutableCommandBufferTest
if (i < update_global_offset && 0 != resultData[i])
{
log_error("Data failed to verify: update_global_offset != "
"resultData[%d]=%d\n",
"resultData[%zu]=%d\n",
i, resultData[i]);
return TEST_FAIL;
}
else if (i >= update_global_offset
&& update_global_offset != resultData[i])
{
log_error("Data failed to verify: update_global_offset != "
"resultData[%d]=%d\n",
"resultData[%zu]=%d\n",
i, resultData[i]);
return TEST_FAIL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ struct MutableDispatchGlobalSize : public InfoMutableCommandBufferTest
if (i >= update_global_size && global_work_size != resultData[i])
{
log_error("Data failed to verify: update_global_size != "
"resultData[%d]=%d\n",
"resultData[%zu]=%d\n",
i, resultData[i]);
return TEST_FAIL;
}
else if (i < update_global_size
&& update_global_size != resultData[i])
{
log_error("Data failed to verify: update_global_size != "
"resultData[%d]=%d\n",
"resultData[%zu]=%d\n",
i, resultData[i]);
return TEST_FAIL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ struct MutableDispatchImage1DArguments : public BasicMutableCommandBufferTest
{
if (imageValues_input[i] != outputData[i])
{
log_error("Data failed to verify: imageValues[%d]=%d != "
"outputData[%d]=%d\n",
log_error("Data failed to verify: imageValues[%zu]=%d != "
"outputData[%zu]=%d\n",
i, imageValues_input[i], i, outputData[i]);

return TEST_FAIL;
Expand Down Expand Up @@ -399,8 +399,8 @@ struct MutableDispatchImage2DArguments : public BasicMutableCommandBufferTest
{
if (imageValues_input[i] != outputData[i])
{
log_error("Data failed to verify: imageValues[%d]=%d != "
"outputData[%d]=%d\n",
log_error("Data failed to verify: imageValues[%zu]=%d != "
"outputData[%zu]=%d\n",
i, imageValues_input[i], i, outputData[i]);
return TEST_FAIL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ struct MutableDispatchLocalSize : public InfoMutableCommandBufferTest
if (i < update_global_size && update_local_size != resultData[i])
{
log_error("Data failed to verify: update_local_size != "
"resultData[%d]=%d\n",
"resultData[%zu]=%d\n",
i, resultData[i]);
return TEST_FAIL;
}
else if (i >= update_global_size
&& local_work_size != resultData[i])
{
log_error("Data failed to verify: update_local_size != "
"resultData[%d]=%d\n",
"resultData[%zu]=%d\n",
i, resultData[i]);
return TEST_FAIL;
}
Expand Down

0 comments on commit c32a767

Please sign in to comment.