diff options
author | Guillem Jover <guillem@debian.org> | 2019-01-15 04:43:21 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-01-22 14:20:02 +0100 |
commit | 176bc80236d4a56ac283bf7fdba54c94a33c2f22 (patch) | |
tree | bd9d51bcd529b72edffc272df4de75244c0d26dc | |
parent | 5c9ff51023b54ab56c5f0a8e141b707ac75ed99d (diff) | |
download | dpkg-176bc80236d4a56ac283bf7fdba54c94a33c2f22.tar.gz |
test: Update cppcheck supressions
Supress false positives and intended code usage.
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | t/cppcheck/cppcheck.supp | 25 |
2 files changed, 21 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog index d6bdf353d..4ad1dcff0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -141,6 +141,7 @@ dpkg (1.19.3) UNRELEASED; urgency=medium * Test suite: - Add new shellcheck author test. - Add descriptions for the shellcheck exclude codes. + - Update cppcheck supressions. [ Updated programs translations ] * German (Sven Joachim). diff --git a/t/cppcheck/cppcheck.supp b/t/cppcheck/cppcheck.supp index 7f11afac0..83f1821cb 100644 --- a/t/cppcheck/cppcheck.supp +++ b/t/cppcheck/cppcheck.supp @@ -14,13 +14,27 @@ nullPointerArithmetic:lib/compat/obstack.c // Ignore, we use this construct to ease portability. knownConditionTrueFalse:src/script.c:169 +duplicateExpressionTernary:src/script.c:169 -// Ignore, We use our own test assertions macros. +// Ignore, we are testing the functions. +knownConditionTrueFalse:lib/dpkg/t/t-macros.c + +// Ignore, we use our own test assertions macros. literalWithCharPtrCompare:lib/dpkg/t/t-test.c // Ignore, the code is used only for its binary artifacts. uninitMemberVar:*/Dpkg_Shlibs/patterns.cpp +// BUG: False positive. +knownConditionTrueFalse:src/depcon.c:585 +knownConditionTrueFalse:src/depcon.c:668 + +// BUG: False positive, the loop does an early exit. +identicalInnerCondition:lib/dpkg/fsys-hash.c:100 + +// BUG: False positive, this is an enum not a boolean. +redundantCondition:utils/update-alternatives.c:2711 + // BUG: False positive, the macros from lib/dpkg/dlist.h use the tail member. unusedStructMember:lib/dpkg/triglib.c:378 @@ -28,15 +42,16 @@ unusedStructMember:lib/dpkg/triglib.c:378 nullPointer:src/unpack.c:195 // BUG: False positive, does not understand setjmp-style error handling. +redundantAssignment:lib/compat/selinux.c:73 redundantAssignment:lib/dpkg/t/t-ehandle.c:108 -uninitStructMember:utils/update-alternatives.c:1246 -uninitStructMember:utils/update-alternatives.c:1247 -uninitStructMember:utils/update-alternatives.c:1248 +uninitStructMember:utils/update-alternatives.c:1305 +uninitStructMember:utils/update-alternatives.c:1306 +uninitStructMember:utils/update-alternatives.c:1307 // BUG: False positive, does not understand ohshit(), ohshite() and // bad_format as error terminators. doubleFree:src/script.c -doubleFree:utils/update-alternatives.c:1154 +doubleFree:utils/update-alternatives.c:1213 va_end_missing:lib/dpkg/parsehelp.c:68 // BUG: False positive, the code uses va_copy(). |