From fd2fe58bf43f451b04402f38d8787e4100ef48bf Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 8 Feb 2026 12:40:39 -0800 Subject: Add more compiler warnings for ./configure --warn --warn. --- configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 27c77c08..58d4cb88 100755 --- a/configure +++ b/configure @@ -145,7 +145,7 @@ case "$1" in --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; -c* | --const) zconst=1; shift ;; - -w* | --warn) warn=1; shift ;; + -w* | --warn) warn=$((warn + 1)); shift ;; -d* | --debug) debug=1; shift ;; --sanitize) address=1; shift ;; --address) address=1; shift ;; @@ -251,11 +251,14 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then CFLAGS="${CFLAGS} -m64" SFLAGS="${SFLAGS} -m64" fi - if test "$warn" -eq 1; then + if test "$warn" -ge 1; then CFLAGS="${CFLAGS} -Wall -Wextra" + if test "$warn" -ge 2; then + CFLAGS="${CFLAGS} -Wconversion -Wshadow -Wundef" + fi fi if test "$zconst" -eq 1; then - if test "$warn" -eq 1; then + if test "$warn" -ge 1; then CFLAGS="${CFLAGS} -Wcast-qual" fi CFLAGS="${CFLAGS} -DZLIB_CONST" -- cgit v1.2.3-55-g6feb