From c77c2d4f9c413b04f2bd6107f61594deb1abb8de Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 24 Sep 2019 09:43:34 +0200 Subject: [PATCH] BUILD: makefile: work around yet another GCC fantasy (-Wstring-plus-int) According to issue #294 some gcc versions suspect that developers are having trouble dealing with string offsets and now emit another new childish warning when mapping indexes to characters. Instead of annoying developers each time it happens and ask them to modify their valid code, let's just get rid of this absurd warning. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 94b0af5f4..53a80d48c 100644 --- a/Makefile +++ b/Makefile @@ -194,6 +194,7 @@ SPEC_CFLAGS += $(call cc-nowarn,missing-field-initializers) SPEC_CFLAGS += $(call cc-nowarn,implicit-fallthrough) SPEC_CFLAGS += $(call cc-nowarn,stringop-overflow) SPEC_CFLAGS += $(call cc-nowarn,cast-function-type) +SPEC_CFLAGS += $(call cc-nowarn,string-plus-int) SPEC_CFLAGS += $(call cc-opt,-Wtype-limits) SPEC_CFLAGS += $(call cc-opt,-Wshift-negative-value) SPEC_CFLAGS += $(call cc-opt,-Wshift-overflow=2)