]> git.ipfire.org Git - pakfire.git/commitdiff
configure: Enable lots more compiler warnings
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Oct 2023 10:00:20 +0000 (10:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Oct 2023 10:00:20 +0000 (10:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
configure.ac

index deba56cedcbe9d9b2929d2eb9b5affdb020cded8..4db908b521d342487de75656f5145dddfe214122 100644 (file)
@@ -100,17 +100,48 @@ m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-conf
 AC_PROG_CC
 
 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+       -std=gnu11 \
        -Wall \
-       -Wchar-subscripts \
-       -Wformat-security \
-       -Wmissing-declarations \
-       -Wmissing-prototypes \
+       -Wextra \
+       -Warray-bounds=2 \
+       -Wdate-time \
+       -Wendif-labels \
+       -Werror=format=2 \
+       -Werror=format-signedness \
+       -Werror=implicit-function-declaration \
+       -Werror=implicit-int \
+       -Werror=incompatible-pointer-types \
+       -Werror=int-conversion \
+       -Werror=missing-declarations \
+       -Werror=missing-prototypes \
+       -Werror=overflow \
+       -Werror=override-init \
+       -Werror=return-type \
+       -Werror=shift-count-overflow \
+       -Werror=shift-overflow=2 \
+       -Werror=strict-flex-arrays \
+       -Werror=undef \
+       -Wfloat-equal \
+       -Wimplicit-fallthrough=5 \
+       -Winit-self \
+       -Wlogical-op \
+       -Wmissing-include-dirs \
+       -Wmissing-noreturn \
        -Wnested-externs \
+       -Wold-style-definition \
        -Wpointer-arith \
+       -Wredundant-decls \
        -Wshadow \
-       -Wsign-compare \
+       -Wstrict-aliasing=2 \
        -Wstrict-prototypes \
-       -Wtype-limits \
+       -Wsuggest-attribute=noreturn \
+       -Wunused-function \
+       -Wwrite-strings \
+       -Wzero-length-bounds \
+       -Wno-unused-parameter \
+       -Wno-missing-field-initializers \
+       -fdiagnostics-show-option \
+       -fno-common \
 ])
 
 # Enable -fanalyzer if requested