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

@@ -165,7 +165,7 @@ static int create_object_and_check_properties(cl_context context,
}
if (set_size != test_case.properties.size() * sizeof(cl_mem_properties))
{
log_error("ERROR: CL_MEM_PROPERTIES size is %d, expected %d.\n",
log_error("ERROR: CL_MEM_PROPERTIES size is %zu, expected %zu.\n",
set_size,
test_case.properties.size() * sizeof(cl_queue_properties));
return TEST_FAIL;