From: Michael Tremer Date: Thu, 5 Oct 2023 10:00:20 +0000 (+0000) Subject: configure: Enable lots more compiler warnings X-Git-Tag: 0.9.30~1540 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42034590aa4b73d768fcdf5b90e959d5a02f4ecc;p=pakfire.git configure: Enable lots more compiler warnings Signed-off-by: Michael Tremer --- diff --git a/configure.ac b/configure.ac index deba56ced..4db908b52 100644 --- a/configure.ac +++ b/configure.ac @@ -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