mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-20 22:39:03 +00:00
integer_ops: fix -Wformat warnings (#1860)
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:
committed by
GitHub
parent
47d5d371cd
commit
b36b2d592c
@@ -22,6 +22,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
|
||||
#include "procs.h"
|
||||
|
||||
@@ -140,7 +141,13 @@ static int verify_subsat_long( const cl_long *inA, const cl_long *inB, const cl_
|
||||
r = CL_LONG_MIN;
|
||||
}
|
||||
if( r != outptr[i] )
|
||||
{ log_info( "%d) Failure for sub_sat( (long%s) 0x%16.16llx, (long%s) 0x%16.16llx) = *0x%16.16llx vs 0x%16.16llx\n", i, sizeName, inA[i], sizeName, inB[i], r, outptr[i] ); return -1; }
|
||||
{
|
||||
log_info("%d) Failure for sub_sat( (long%s) 0x%16.16" PRIx64
|
||||
", (long%s) 0x%16.16" PRIx64 ") = *0x%16.16" PRIx64
|
||||
" vs 0x%16.16" PRIx64 "\n",
|
||||
i, sizeName, inA[i], sizeName, inB[i], r, outptr[i]);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -154,7 +161,13 @@ static int verify_subsat_ulong( const cl_ulong *inA, const cl_ulong *inB, const
|
||||
if( inA[i] < inB[i] )
|
||||
r = 0;
|
||||
if( r != outptr[i] )
|
||||
{ log_info( "%d) Failure for sub_sat( (ulong%s) 0x%16.16llx, (ulong%s) 0x%16.16llx) = *0x%16.16llx vs 0x%16.16llx\n", i, sizeName, inA[i], sizeName, inB[i], r, outptr[i] ); return -1; }
|
||||
{
|
||||
log_info("%d) Failure for sub_sat( (ulong%s) 0x%16.16" PRIx64
|
||||
", (ulong%s) 0x%16.16" PRIx64 ") = *0x%16.16" PRIx64
|
||||
" vs 0x%16.16" PRIx64 "\n",
|
||||
i, sizeName, inA[i], sizeName, inB[i], r, outptr[i]);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user