This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
commit d72b33214a2cd398b34a921500abc0c5e4968be1 Author: Guillem Jover <[email protected]> Date: Sun Sep 4 17:17:15 2016 +0200 build: Check the availability of -Wpositive variant instead of -Wno-positive At least gcc and clang do not warn on -Wno-* warning flags, only when something else needs to be reported, which defeats our test. In those cases pass an additional argument that will be what we will actually check, but not use afterwards. --- debian/changelog | 3 +++ m4/dpkg-compiler.m4 | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index a98cc68..7f86c99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,9 @@ dpkg (1.18.11) UNRELEASED; urgency=medium mode (not used in Debian). Regression introduced in dpkg 1.18.8. - Change --with-* option logic to default to check. - Disable -Wtautological-constant-out-of-range-compare (for clang). + - Check the availability of -W<warning> variant instead of -Wno-<warning>. + As at least gcc and clang do not warn on -Wno-* warning flags, only + when some unrelated warning needs to be emitted. [ Updated manpages translations ] * German (Helge Kreutzmann). diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4 index 5ac9873..ad11c19 100644 --- a/m4/dpkg-compiler.m4 +++ b/m4/dpkg-compiler.m4 @@ -4,6 +4,8 @@ # DPKG_CHECK_COMPILER_FLAG # ------------------------ AC_DEFUN([DPKG_CHECK_COMPILER_FLAG], [ + m4_define([dpkg_check_flag], [m4_default([$2], [$1])]) + AC_LANG_CASE( [C], [ m4_define([dpkg_compiler], [$CC]) @@ -21,7 +23,7 @@ AC_DEFUN([DPKG_CHECK_COMPILER_FLAG], [ ]) AC_CACHE_CHECK([whether ]dpkg_compiler[ accepts $1], [dpkg_varname_cache], [ AS_VAR_COPY([dpkg_varname_save], [dpkg_varname]) - AS_VAR_SET([dpkg_varname], ["$1 -Werror"]) + AS_VAR_SET([dpkg_varname], ["-Werror dpkg_check_flag"]) AC_COMPILE_IFELSE([ AC_LANG_SOURCE([[]]) ], [ @@ -43,9 +45,11 @@ AC_DEFUN([DPKG_CHECK_COMPILER_FLAG], [ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [ DPKG_CHECK_COMPILER_FLAG([-Wall]) DPKG_CHECK_COMPILER_FLAG([-Wextra]) - DPKG_CHECK_COMPILER_FLAG([-Wno-unused-parameter]) - DPKG_CHECK_COMPILER_FLAG([-Wno-missing-field-initializers]) - DPKG_CHECK_COMPILER_FLAG([-Wno-tautological-constant-out-of-range-compare]) + DPKG_CHECK_COMPILER_FLAG([-Wno-unused-parameter], [-Wunused-parameter]) + DPKG_CHECK_COMPILER_FLAG([-Wno-missing-field-initializers], + [-Wmissing-field-initializers]) + DPKG_CHECK_COMPILER_FLAG([-Wno-tautological-constant-out-of-range-compare], + [-Wtautological-constant-out-of-range-compare]) DPKG_CHECK_COMPILER_FLAG([-Wmissing-declarations]) DPKG_CHECK_COMPILER_FLAG([-Wmissing-format-attribute]) DPKG_CHECK_COMPILER_FLAG([-Wformat -Wformat-security]) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/dpkg/dpkg.git

