mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-21 14:59:02 +00:00
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:
committed by
GitHub
parent
96361171ed
commit
83203db6e2
@@ -433,7 +433,7 @@ int Test_vStoreHalf_private(cl_device_id device, f2h referenceFunc,
|
||||
};
|
||||
|
||||
char local_buf_size[10];
|
||||
sprintf(local_buf_size, "%lld", (uint64_t)gWorkGroupSize);
|
||||
sprintf(local_buf_size, "%zu", gWorkGroupSize);
|
||||
|
||||
|
||||
const char *source_local_store[] = {
|
||||
@@ -1308,7 +1308,7 @@ int Test_vStoreaHalf_private(cl_device_id device, f2h referenceFunc,
|
||||
};
|
||||
|
||||
char local_buf_size[10];
|
||||
sprintf(local_buf_size, "%lld", (uint64_t)gWorkGroupSize);
|
||||
sprintf(local_buf_size, "%zu", gWorkGroupSize);
|
||||
const char *source_local[] = { "__kernel void test( __global float",
|
||||
vector_size_name_extensions[vectorSize],
|
||||
" *p, __global half *f )\n"
|
||||
|
||||
Reference in New Issue
Block a user