From: Michihiro NAKAJIMA Date: Thu, 9 Feb 2012 11:02:00 +0000 (+0900) Subject: Enable aggressive warning options, -Wextra -Wunused -Wshadow -Wmissing-prototypes... X-Git-Tag: v3.0.4~2^2~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82d66e035dbba623c0f2c88b6351b7649c93f986;p=thirdparty%2Flibarchive.git Enable aggressive warning options, -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual. It helps us find out minor issues. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1714df019..8ad306fe4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ SET(SOVERSION "${INTERFACE_VERSION}") # aggressive about diagnosing build problems; this can get # relaxed somewhat in final shipping versions. IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") - ADD_DEFINITIONS(-Wall -Werror) + ADD_DEFINITIONS(-Wall -Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual) SET(CMAKE_REQUIRED_FLAGS "-Wall -Werror") ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") diff --git a/Makefile.am b/Makefile.am index 5a30316c5..aa715bb11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,7 @@ TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $ DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio # The next line is commented out by default in shipping libarchive releases. # It is uncommented by default in trunk. -AM_CFLAGS=-Wall -Werror +AM_CFLAGS=-Wall -Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wcast-qual PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@ AM_CPPFLAGS=$(PLATFORMCPPFLAGS)