basic: fix size_t Wformat warnings (#2264)

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

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2025-02-18 18:11:32 +01:00
committed by GitHub
parent 9c5999bc1d
commit ea934a7648
11 changed files with 113 additions and 81 deletions

View File

@@ -82,7 +82,8 @@ int test_local_kernel_scope(cl_device_id device, cl_context context, cl_command_
while( testSize < 1024 )
testSize += workGroupSize;
size_t numGroups = testSize / workGroupSize;
log_info( "\tTesting with %ld groups, %ld elements per group...\n", numGroups, workGroupSize );
log_info("\tTesting with %zu groups, %zu elements per group...\n",
numGroups, workGroupSize);
// Create two buffers for operation
cl_uint *inputData = (cl_uint*)malloc( testSize * sizeof(cl_uint) );
@@ -124,7 +125,9 @@ int test_local_kernel_scope(cl_device_id device, cl_context context, cl_command_
if( outputData[ i ] != localMax )
{
log_error( "ERROR: Local max validation failed! (expected %u, got %u for i=%lu)\n", localMax, outputData[ i ] , i );
log_error("ERROR: Local max validation failed! (expected %u, got "
"%u for i=%zu)\n",
localMax, outputData[i], i);
free(inputData);
free(outputData);
return -1;