half: fix -Wformat warnings (#1927)

Avoid casting to `uint64_t` in some places; instead keep the types as
`size_t` and use the `%z` length modifier, or as
`uint32_t` and use the `%u` specifier.

For printing of 64-bit types, use the `PRI*64` macros from <cinttypes>
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-03-27 14:46:27 +01:00
committed by GitHub
parent 96361171ed
commit 83203db6e2
4 changed files with 26 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ test_status InitCL( cl_device_id device )
gTestDouble ^= hasDouble;
vlog( "%d compute devices at %f GHz\n", gComputeDevices, (double) gDeviceFrequency / 1000. );
vlog( "Max thread group size is %lld.\n", (uint64_t) gMaxThreadGroupSize );
vlog("Max thread group size is %zu.\n", gMaxThreadGroupSize);
gContext = clCreateContext( NULL, 1, &device, notify_callback, NULL, &error );
if( NULL == gContext )