api: fix -Wformat warnings (#2025)

The main sources of warnings were:

 * Printing of a `size_t` which requires the `%zu` specifier.

 * Printing of `cl_long`/`cl_ulong` which is now done using the `PRI*64`
macros to ensure portability across 32 and 64-bit builds.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2024-09-02 12:02:28 +02:00
committed by GitHub
parent a7162188d6
commit 90f523ea57
8 changed files with 126 additions and 94 deletions

View File

@@ -142,9 +142,10 @@ static int create_queue_and_check_array_properties(
}
if (set_size != test_case.properties.size() * sizeof(cl_queue_properties))
{
log_error("ERROR: CL_QUEUE_PROPERTIES_ARRAY size is %d, expected %d.\n",
set_size,
test_case.properties.size() * sizeof(cl_queue_properties));
log_error(
"ERROR: CL_QUEUE_PROPERTIES_ARRAY size is %zu, expected %zu.\n",
set_size,
test_case.properties.size() * sizeof(cl_queue_properties));
return TEST_FAIL;
}