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:
Sven van Haastregt
2025-03-25 17:45:18 +01:00
committed by GitHub
parent 1cbb548e27
commit b6924adfb2
8 changed files with 112 additions and 43 deletions

View File

@@ -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)
{