Move -Wno-string-plus-int to portability.sh and have it only apply to clang.
On gcc that spurious warning isn't generated so the -W to suppress it
isn't recognized. It doesn't complain an unknown -Wno-blah unless it's
producing other warnings, but when it does there's always an extra line
of noise, so fix it.
diff --git a/configure b/configure
index 05565a8..d6bbd7d 100755
--- a/configure
+++ b/configure
@@ -13,7 +13,7 @@
# Warn about stuff, disable stupid warnings, be 8-bit clean for utf8.
[ "${CFLAGS/-funsigned-char//}" == "$CFLAGS" ] &&
- CFLAGS+=" -Wall -Wundef -Werror=implicit-function-declaration -Wno-char-subscripts -Wno-pointer-sign -Wno-string-plus-int -funsigned-char"
+ CFLAGS+=" -Wall -Wundef -Werror=implicit-function-declaration -Wno-char-subscripts -Wno-pointer-sign -funsigned-char"
# Set default values if variable not already set
: ${CC:=cc} ${HOSTCC:=cc} ${GENDIR:=generated} ${KCONFIG_CONFIG:=.config}
diff --git a/scripts/portability.sh b/scripts/portability.sh
index dafde26..60c1d4b 100644
--- a/scripts/portability.sh
+++ b/scripts/portability.sh
@@ -22,6 +22,10 @@
: ${LDOPTIMIZE:=-Wl,--gc-sections -Wl,--as-needed} ${STRIP:=strip -s -R .note* -R .comment}
fi
+# Disable a pointless warning only clang produces
+[ -n "$("$CROSS_COMPILE"cc --version | grep -w clang)" ] &&
+ CFLAGS+=" -Wno-string-plus-int"
+
# Address Sanitizer
if [ ! -z "$ASAN" ]; then
# Turn ASan on and disable most optimization to get more readable backtraces.