From: Alejandro Colomar Date: Mon, 22 Jan 2024 21:25:34 +0000 (+0100) Subject: autogen.sh: CFLAGS: Add some -Werror=... flags that will be default soon X-Git-Tag: 4.15.0-rc1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d74ffd3c2991367fbcfcbd51b258008261ca86b8;p=thirdparty%2Fshadow.git autogen.sh: CFLAGS: Add some -Werror=... flags that will be default soon Clang 16 and GCC 14 have upgraded several warnings to errors by default. Also, there are new warnings that will be requirements of ISO C23. Add all of those to our build. Use Clang's -Wno-unknown-attribute-option, to ignore warnings that are exclusive of GCC. Sadly, GCC doesn't have such an option. Link: Link: Suggested-by: Sam James Signed-off-by: Alejandro Colomar --- diff --git a/autogen.sh b/autogen.sh index 07236426b..a31f611cd 100755 --- a/autogen.sh +++ b/autogen.sh @@ -6,7 +6,11 @@ CFLAGS="-O2" CFLAGS="$CFLAGS -Wall" CFLAGS="$CFLAGS -Wextra" CFLAGS="$CFLAGS -Werror=implicit-function-declaration" +CFLAGS="$CFLAGS -Werror=implicit-int" +CFLAGS="$CFLAGS -Werror=incompatible-pointer-types" +CFLAGS="$CFLAGS -Werror=int-conversion" CFLAGS="$CFLAGS -Wno-expansion-to-defined" +CFLAGS="$CFLAGS -Wno-unknown-warning-option" "$(dirname "$0")"/configure \ CFLAGS="$CFLAGS" \