From bfbc2866c596a6970b0fb95c48d1ebb8349f4af3 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sat, 1 Nov 2014 15:25:01 +0530 Subject: [PATCH] Add the -Wextra flag by default After the Spring Cleaning on warnings in early 2014, GCC and Clang emit only about two warnings when compiling Wget with -Wall -Wextra. Enable both these flags by default so that new warnings in these areas are more prominent. --- ChangeLog | 4 ++++ configure.ac | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0be7e9ff..51889fb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-11-20 Darshit Shah + + * configure.ac: Add the -Wextra flag when no CFLAGS are set + 2014-11-19 Tim Ruehsen * configure.ac: Check for random() diff --git a/configure.ac b/configure.ac index e589b93b..93c15a32 100644 --- a/configure.ac +++ b/configure.ac @@ -165,9 +165,11 @@ dnl if compiler is gcc, then dnl use -O2 and some warning flags dnl else dnl use os-specific flags or -O +dnl +dnl For these tests, the system considers clang to be gcc if test -n "$auto_cflags"; then if test -n "$GCC"; then - CFLAGS="$CFLAGS -O2 -Wall" + CFLAGS="$CFLAGS -O2 -Wall -Wextra" else case "$host_os" in *hpux*) CFLAGS="$CFLAGS +O3" ;;