ruby-changes:72402
From: Nobuyoshi <ko1@a...>
Date: Sun, 3 Jul 2022 00:07:23 +0900 (JST)
Subject: [ruby-changes:72402] d8be7d463d (master): Suppress -Wstring-concatenation
https://git.ruby-lang.org/ruby.git/commit/?id=d8be7d463d From d8be7d463d0c0764a9fcd25bdf1c2a0a4cb215a4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 2 Jul 2022 22:41:19 +0900 Subject: 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 @@ https://github.com/ruby/ruby/blob/trunk/debug_counter.c#L17 #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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/