From d74ffd3c2991367fbcfcbd51b258008261ca86b8 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 22 Jan 2024 22:25:34 +0100 Subject: [PATCH] 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 --- autogen.sh | 4 ++++ 1 file changed, 4 insertions(+) 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" \ -- 2.47.2