mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
basic: fix Wformat warnings (#2343)
Fix all `-Wformat` warnings in the basic test suite, and re-enable the warning. --------- Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
1cbb548e27
commit
b6924adfb2
@@ -15,6 +15,8 @@
|
||||
//
|
||||
#include "testBase.h"
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
#define TEST_VALUE_POSITIVE( string_name, name, value ) \
|
||||
{ \
|
||||
if (name < value) { \
|
||||
@@ -528,7 +530,14 @@ const char *kernel_constant_double_limits[] = {
|
||||
};
|
||||
|
||||
#define TEST_FLOAT_ASSERTION( a, msg, f ) if( !( a ) ) { log_error( "ERROR: Float constant failed requirement: %s (bitwise value is 0x%8.8x)\n", msg, *( (uint32_t *)&f ) ); return -1; }
|
||||
#define TEST_DOUBLE_ASSERTION( a, msg, f ) if( !( a ) ) { log_error( "ERROR: Double constant failed requirement: %s (bitwise value is 0x%16.16llx)\n", msg, *( (uint64_t *)&f ) ); return -1; }
|
||||
#define TEST_DOUBLE_ASSERTION(a, msg, f) \
|
||||
if (!(a)) \
|
||||
{ \
|
||||
log_error("ERROR: Double constant failed requirement: %s (bitwise " \
|
||||
"value is 0x%16.16" PRIx64 ")\n", \
|
||||
msg, *((uint64_t *)&f)); \
|
||||
return -1; \
|
||||
}
|
||||
|
||||
REGISTER_TEST(kernel_limit_constants)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user