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=4e4ae843ab712fdf263354a94604c7af346bd476

commit 4e4ae843ab712fdf263354a94604c7af346bd476
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Aug 29 01:34:19 2019 +0200

    dpkg: Initialize flagdeppossi in check_conflict()
    
    We only use this variable as a sentinel pointer so that we can make
    sure the pdep pointer is not NULL in subsequent checks. But cppcheck
    gets confused, so let's initialize it to make the code more
    future-proof.
    
    Warned-by: cppcheck
---
 debian/changelog | 1 +
 src/archives.c   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 261862d4a..d42410ce0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -44,6 +44,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
     - libdpkg: Use the totalwritten variable for a consistency check.
     - dselect: Reduce scope of variable, to avoid it being unused in a branch.
     - dpkg-deb: Fold two adjacent if conditionals into a single one.
+    - dpkg: Initialize flagdeppossi in check_conflict().
   * Build system:
     - Bump minimal Perl version to 5.24.1.
     - Add a serial versioning to the m4 files.
diff --git a/src/archives.c b/src/archives.c
index f74bceed8..84cc10f2a 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -1327,7 +1327,7 @@ void check_breaks(struct dependency *dep, struct pkginfo 
*pkg,
 void check_conflict(struct dependency *dep, struct pkginfo *pkg,
                     const char *pfilename) {
   struct pkginfo *fixbyrm;
-  struct deppossi *pdep, flagdeppossi;
+  struct deppossi *pdep, flagdeppossi = { 0 };
   struct varbuf conflictwhy = VARBUF_INIT, removalwhy = VARBUF_INIT;
   struct dependency *providecheck;
 

-- 
Dpkg.Org's dpkg

Reply via email to