aboutsummaryrefslogtreecommitdiffstats
path: root/debug_counter.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-07-02 22:41:19 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-07-03 00:05:53 +0900
commitd8be7d463d0c0764a9fcd25bdf1c2a0a4cb215a4 (patch)
tree9e67d16b674c4a6038a860e224e8000306800a7c /debug_counter.c
parent8c6a2cc24e6fcc49615d24e865f628a9b3606df5 (diff)
downloadruby-d8be7d463d0c0764a9fcd25bdf1c2a0a4cb215a4.tar.gz
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.
Diffstat (limited to 'debug_counter.c')
-rw-r--r--debug_counter.c4
1 files changed, 3 insertions, 1 deletions
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