diff options
| author | Mark Adler <git@madler.net> | 2026-02-08 12:40:39 -0800 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-02-09 07:09:52 -0800 |
| commit | fd2fe58bf43f451b04402f38d8787e4100ef48bf (patch) | |
| tree | f8f5cc5c90ca9cc1fb0277d3d6d72f1e5680ddf8 | |
| parent | 8371b539e2a4b2fb8470aacf867e230f256f11e4 (diff) | |
| download | zlib-fd2fe58bf43f451b04402f38d8787e4100ef48bf.tar.gz zlib-fd2fe58bf43f451b04402f38d8787e4100ef48bf.tar.bz2 zlib-fd2fe58bf43f451b04402f38d8787e4100ef48bf.zip | |
Add more compiler warnings for ./configure --warn --warn.
| -rwxr-xr-x | configure | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -145,7 +145,7 @@ case "$1" in | |||
| 145 | --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; | 145 | --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; |
| 146 | --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; | 146 | --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; |
| 147 | -c* | --const) zconst=1; shift ;; | 147 | -c* | --const) zconst=1; shift ;; |
| 148 | -w* | --warn) warn=1; shift ;; | 148 | -w* | --warn) warn=$((warn + 1)); shift ;; |
| 149 | -d* | --debug) debug=1; shift ;; | 149 | -d* | --debug) debug=1; shift ;; |
| 150 | --sanitize) address=1; shift ;; | 150 | --sanitize) address=1; shift ;; |
| 151 | --address) address=1; shift ;; | 151 | --address) address=1; shift ;; |
| @@ -251,11 +251,14 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then | |||
| 251 | CFLAGS="${CFLAGS} -m64" | 251 | CFLAGS="${CFLAGS} -m64" |
| 252 | SFLAGS="${SFLAGS} -m64" | 252 | SFLAGS="${SFLAGS} -m64" |
| 253 | fi | 253 | fi |
| 254 | if test "$warn" -eq 1; then | 254 | if test "$warn" -ge 1; then |
| 255 | CFLAGS="${CFLAGS} -Wall -Wextra" | 255 | CFLAGS="${CFLAGS} -Wall -Wextra" |
| 256 | if test "$warn" -ge 2; then | ||
| 257 | CFLAGS="${CFLAGS} -Wconversion -Wshadow -Wundef" | ||
| 258 | fi | ||
| 256 | fi | 259 | fi |
| 257 | if test "$zconst" -eq 1; then | 260 | if test "$zconst" -eq 1; then |
| 258 | if test "$warn" -eq 1; then | 261 | if test "$warn" -ge 1; then |
| 259 | CFLAGS="${CFLAGS} -Wcast-qual" | 262 | CFLAGS="${CFLAGS} -Wcast-qual" |
| 260 | fi | 263 | fi |
| 261 | CFLAGS="${CFLAGS} -DZLIB_CONST" | 264 | CFLAGS="${CFLAGS} -DZLIB_CONST" |
