select: fix -Wformat warnings (#1817)

* Printing of a `size_t` requires the `%z` specifier.

 * Printing of `cl_long`/`cl_ulong` 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
2023-09-22 15:10:44 +01:00
committed by GitHub
parent 7759c2669a
commit b143a990d9
2 changed files with 29 additions and 26 deletions

View File

@@ -20,6 +20,8 @@
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <cinttypes>
#include <vector>
#if ! defined( _WIN32)
@@ -441,7 +443,7 @@ static int doTest(cl_command_queue queue, cl_context context, Type stype, Type c
block_elements, element_count[vecsize])
!= 0)
{
log_error("vec_size:%d indx: 0x%16.16llx\n",
log_error("vec_size:%d indx: 0x%16.16" PRIx64 "\n",
(int)element_count[vecsize], i);
return TEST_FAIL;
}