This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=35430c52c8b8b311985535b46bd7ba592bb5d805

commit 35430c52c8b8b311985535b46bd7ba592bb5d805
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Nov 3 16:29:05 2019 +0100

    Dpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration for 
C++
    
    Closes: #939969
---
 debian/changelog              |  2 ++
 scripts/Dpkg/Vendor/Debian.pm | 17 +++++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f9698ef17..abd1c27f1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -42,6 +42,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
       single-debian-patch. Closes: #933152
     - Dpkg::Vendor::Debian: Only scan /usr/local/ directories that exist.
       Closes: #932967
+    - Dpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration
+      for C++. Closes: #939969
   * Documentation:
     - man: Fix uncommon wording constructs.
     - man: Use a minus sign for a literal string.
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 65c7f2bad..71aa59038 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -185,8 +185,21 @@ sub _add_build_flags {
 
     # Warnings that detect actual bugs.
     if ($use_feature{qa}{bug}) {
-        foreach my $warnflag (qw(array-bounds clobbered volatile-register-var
-                                 implicit-function-declaration)) {
+        # C flags
+        my @cflags = qw(
+            implicit-function-declaration
+        );
+        foreach my $warnflag (@cflags) {
+            $flags->append('CFLAGS', "-Werror=$warnflag");
+        }
+
+        # C/C++ flags
+        my @cfamilyflags = qw(
+            array-bounds
+            clobbered
+            volatile-register-var
+        );
+        foreach my $warnflag (@cfamilyflags) {
             $flags->append('CFLAGS', "-Werror=$warnflag");
             $flags->append('CXXFLAGS', "-Werror=$warnflag");
         }

-- 
Dpkg.Org's dpkg

Reply via email to