>From bf24cf2d5717505b5c880d2eb6714789f86a902c Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 23 Jul 2019 02:02:47 +0000 Subject: [PATCH] disable some known-unwanted but enabled-by-default warnings in clang the known-unwanted -Wstring-plus-int and the warning group -Wparentheses are enabled by default in clang. adjust CFLAGS_AUTO to disable these warnings whether or not --enable-warnings is specified. --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 86801281..7f63a873 100755 --- a/configure +++ b/configure @@ -514,7 +514,6 @@ test "$cc_family" = clang && tryflag CFLAGS_AUTO -Qunused-arguments if test "x$warnings" = xyes ; then tryflag CFLAGS_AUTO -Wall -tryflag CFLAGS_AUTO -Wno-parentheses tryflag CFLAGS_AUTO -Wno-uninitialized tryflag CFLAGS_AUTO -Wno-missing-braces tryflag CFLAGS_AUTO -Wno-unused-value @@ -522,6 +521,9 @@ tryflag CFLAGS_AUTO -Wno-unused-but-set-variable tryflag CFLAGS_AUTO -Wno-unknown-pragmas tryflag CFLAGS_AUTO -Wno-pointer-to-int-cast fi +tryflag CFLAGS_AUTO -Wno-string-plus-int +tryflag CFLAGS_AUTO -Wno-parentheses +tryflag CFLAGS_AUTO -Wdangling-else # Determine if the compiler produces position-independent code (PIC) # by default. If so, we don't need to compile separate object files -- 2.22.0