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=8a98dae74c864ef3f44855a5c2edf42aa9a7bc0e

commit 8a98dae74c864ef3f44855a5c2edf42aa9a7bc0e
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Jan 29 00:09:53 2020 +0100

    test: Remove redundant assignment
    
    This is really a redundant assignment, as the variable is local, and
    even if the error handler was triggered, it would jump to the first
    branch of the setjmp conditional, which also sets pass to false.
    
    Warned-by: cppcheck
---
 debian/changelog         | 1 +
 lib/dpkg/t/t-ehandle.c   | 3 ---
 t/cppcheck/cppcheck.supp | 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0fc77c96e..9ea143548 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -181,6 +181,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
     - Skip build directories from codespell check.
     - Update stopwords for codespell 1.16.0.
     - Suppress new bogus cppcheck 1.90 false positives.
+    - libdpkg: Remove redundant assignment in t-ehandle unit test.
 
   [ Updated programs translations ]
   * German (Sven Joachim).
diff --git a/lib/dpkg/t/t-ehandle.c b/lib/dpkg/t/t-ehandle.c
index 7a20887af..f57381cce 100644
--- a/lib/dpkg/t/t-ehandle.c
+++ b/lib/dpkg/t/t-ehandle.c
@@ -96,9 +96,6 @@ test_cleanup_error(void)
                pop_cleanup(ehflag_normaltidy);
                pop_error_context(ehflag_normaltidy);
        } else {
-               /* Mark any error before this as not passing. */
-               pass = false;
-
                push_error_context_jump(&handler_jump, printer_empty, "test 
cleanup");
                push_cleanup(cleanup_error, ~ehflag_normaltidy, 0);
                pop_error_context(ehflag_bombout);
diff --git a/t/cppcheck/cppcheck.supp b/t/cppcheck/cppcheck.supp
index 828ea6360..4b3794250 100644
--- a/t/cppcheck/cppcheck.supp
+++ b/t/cppcheck/cppcheck.supp
@@ -52,7 +52,6 @@ nullPointerArithmeticRedundantCheck:lib/dpkg/pkg-format.c:82
 
 // BUG: False positive, does not understand setjmp-style error handling.
 redundantAssignment:lib/compat/selinux.c:73
-redundantAssignment:lib/dpkg/t/t-ehandle.c:108
 nullPointerRedundantCheck:utils/update-alternatives.c:1193
 uninitStructMember:utils/update-alternatives.c:1340
 uninitStructMember:utils/update-alternatives.c:1341

-- 
Dpkg.Org's dpkg

Reply via email to