mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix various Wformat warnings (#2135)
test_copy_1D.cpp: num_mip_levels is a cl_uint, so don't cast and just print using `%u`. test_pipe_info.cpp: arg_type_qualifier is a 64-bit wide bitfield, so print in hexadecimal format using the correct length modifier. test_device_partition.cpp: it is not clear what the bit width of `cl_device_partition_property` should be, so cast the operands to align with the format specifiers. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
d3b9520adc
commit
e360d2de5b
@@ -324,7 +324,7 @@ void generate_shuffle_mask( char *outMaskString, size_t maskSize, const ShuffleO
|
||||
for( size_t jj = 0; jj < maskSize; jj++ )
|
||||
{
|
||||
char thisMask[ 16 ];
|
||||
sprintf( thisMask, "%s%ld", ( jj == 0 ) ? "" : ", ", jj );
|
||||
sprintf(thisMask, "%s%zu", (jj == 0) ? "" : ", ", jj);
|
||||
strcat( outMaskString, thisMask );
|
||||
}
|
||||
}
|
||||
@@ -347,7 +347,7 @@ static int create_shuffle_kernel( cl_context context, cl_program *outProgram, cl
|
||||
if( inVecSize == 1 ) //|| (inVecSize == 3)) // just have arrays if we go with size 3
|
||||
inSizeName[ 0 ] = 0;
|
||||
else
|
||||
sprintf( inSizeName, "%ld", inVecSize );
|
||||
sprintf(inSizeName, "%zu", inVecSize);
|
||||
if( inVecSize == 3 )
|
||||
inSizeArgName[ 0 ] = 0;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user