From d8be7d463d0c0764a9fcd25bdf1c2a0a4cb215a4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 2 Jul 2022 22:41:19 +0900 Subject: [PATCH] Suppress -Wstring-concatenation This concatenation of string literals is to not empty the array initialization even if no counter is declared, but warned by clang as suspicious. --- debug_counter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debug_counter.c b/debug_counter.c index e7b0bb0acd..cc522283a1 100644 --- a/debug_counter.c +++ b/debug_counter.c @@ -17,7 +17,9 @@ #if USE_DEBUG_COUNTER static const char *const debug_counter_names[] = { - "" +#define DEBUG_COUNTER_NAME_EMPTY "" /* Suppress -Wstring-concatenation */ + DEBUG_COUNTER_NAME_EMPTY +#undef DEBUG_COUNTER_NAME_EMPTY #define RB_DEBUG_COUNTER(name) #name, #include "debug_counter.h" #undef RB_DEBUG_COUNTER