From 41e31c516c7268f8260acb81a09bacbefe3ba8a1 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Sat, 19 Oct 2019 16:59:11 +0200 Subject: [PATCH] tests/log_color: fix string literal error printf function requires a string literal as the format argument. Using a character pointer is not accepted as string literal by some compilers. --- tests/log_color/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/log_color/main.c b/tests/log_color/main.c index b84a94dc7d..67591aad03 100644 --- a/tests/log_color/main.c +++ b/tests/log_color/main.c @@ -18,11 +18,12 @@ #include "log.h" +#define format "Logging value '%d' and string '%s'\n" + int main(void) { const uint8_t value = 42; const char *string = "test"; - const char *format = "Logging value '%d' and string '%s'\n"; LOG_ERROR(format, value, string); LOG_WARNING(format, value, string);