AI review of 2026-12-01_01-27-05-6cd3e47f9ff5-results.txt PR: #9090 https://github.com/cppcheck-opensource/cppcheck/pull/9090 Tested: 6cd3e47f9ff5b721485b0a74bf725980aef583d8 Merge base: edf0fd603c53345d4a5b750d9ac12264e69c1442 Reviewed: 2026-12-03 10:13:33 UTC Model: claude-opus-5-5 (effort high) Results: 291 reviewed of 296 in the report, 5 not reviewed: valueFlowMaxIterations Verdicts: 26 acceptable regression, 158 improvement, 43 neutral, 61 regression, 3 unclear Tokens: 858978 input, 7246428 cache read, 257880 cache write, 215349 output The verdicts are written by AI and can be wrong. ---- 1 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ardupilot/ardupilot_4.7.2+ds9.orig.tar.xz Result: main ardupilot-4.7.2/Tools/cameras_gimbals/xacti-config/main.cpp:78:15: style: Condition 'argc>=2' is always true [knownConditionTrueFalse] ardupilot-4.7.2/Tools/cameras_gimbals/xacti-config/main.cpp:22:15: note: Assuming that condition 'argc<=1' is not redundant ardupilot-4.7.2/Tools/cameras_gimbals/xacti-config/main.cpp:29:9: note: Assuming condition is false ardupilot-4.7.2/Tools/cameras_gimbals/xacti-config/main.cpp:78:15: note: Condition 'argc>=2' is always true Explanation: The notes show an early `if (argc <= 1)` at line 22 that leaves the function (lines 20-30 are not shown). argc is never modified afterwards: the blocks in between only call SetCameraCtrl and printf. So `argc >= 2` at line 78 really is always true, and the removed warning was a true positive. The PR's new partial-path handling seems to have made the value after the earlier if-blocks merely possible, which loses the warning. That is a new false negative, not a removed false positive. ---- 2 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/a/ardupilot/ardupilot_4.7.2+ds9.orig.tar.xz Result: main ardupilot-4.7.2/libraries/AP_SmartRTL/AP_SmartRTL.cpp:479:20: style: Condition 'clean_type!=THOROUGH_CLEAN_SIMPLIFY_ONLY' is always true [knownConditionTrueFalse] ardupilot-4.7.2/libraries/AP_SmartRTL/AP_SmartRTL.cpp:462:20: note: Assuming that condition 'clean_type!=THOROUGH_CLEAN_PRUNE_ONLY' is not redundant ardupilot-4.7.2/libraries/AP_SmartRTL/AP_SmartRTL.cpp:479:20: note: Condition 'clean_type!=THOROUGH_CLEAN_SIMPLIFY_ONLY' is always true Explanation: The block guarded by 'clean_type != THOROUGH_CLEAN_PRUNE_ONLY' only returns on some paths. When _simplify.complete is true and removal_required is false, it falls through to line 479. On that path clean_type can still be THOROUGH_CLEAN_SIMPLIFY_ONLY, so the condition at 479 is not always true. Main treated the then block as always escaping, which is the partial-path problem this PR fixes. Removing this false positive is an improvement. ---- 3 / 291 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/a/ardupilot/ardupilot_4.7.2+ds9.orig.tar.xz Result: main ardupilot-4.7.2/libraries/SITL/SIM_Tracker.cpp:93:20: style: Condition 'pitch_rate>0' is always false [knownConditionTrueFalse] ardupilot-4.7.2/libraries/SITL/SIM_Tracker.cpp:69:42: note: Assignment 'pitch_rate=0.0f', assigned value is 0.0 ardupilot-4.7.2/libraries/SITL/SIM_Tracker.cpp:93:20: note: Condition 'pitch_rate>0' is always false Explanation: `pitch_rate` is a local float set to 0.0f on line 69. Nothing writes to it before line 93; the code in between only touches `yaw_current_relative` and `yaw_rate`. So `pitch_rate > 0` really is always false there, and the removed warning was a true positive. The PR changed how forked paths and termination results are joined and lost this known value, which is a new false negative rather than a false positive being fixed. ---- 4 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpalert/arpalert_2.0.12.orig.tar.gz Result: main arpalert-2.0.12/capture.c:385:10: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] arpalert-2.0.12/capture.c:345:16: note: Assuming allocation function fails arpalert-2.0.12/capture.c:345:16: note: Assignment 'base=strdup(config[CF_IF].valeur.string)', assigned value is 0 arpalert-2.0.12/capture.c:346:11: note: Assignment 'parse=base', assigned value is 0 arpalert-2.0.12/capture.c:350:18: note: Assuming condition is true arpalert-2.0.12/capture.c:385:10: note: Null pointer addition Explanation: This 'main' line is not a lost warning. The same nullPointerArithmeticOutOfMemory at capture.c:385 is still reported by the PR; only the path note changed, from 'Assuming condition is true' at 350:18 to 'Assuming condition is false' at 379:19. If strdup fails, parse is NULL and both paths dereference it in a condition before reaching 'parse++'. Neither trace is more accurate than the other, so the warning and its meaning are unchanged for users. ---- 5 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpalert/arpalert_2.0.12.orig.tar.gz Result: main arpalert-2.0.12/macname.c:76:11: error: Deallocation of a global variable (macname_base) results in undefined behaviour. [autovarInvalidDeallocation] arpalert-2.0.12/macname.c:68:11: note: Address of variable taken here. arpalert-2.0.12/macname.c:70:12: note: Assuming condition is true arpalert-2.0.12/macname.c:73:20: note: Assuming condition is true arpalert-2.0.12/macname.c:76:11: note: Deallocating memory that was not dynamically allocated Explanation: Main and the PR report the same autovarInvalidDeallocation warning at macname.c:76. The only difference is that the PR's error path drops the note 'Assuming condition is true' at line 73. That `if (next->name != NULL)` has nothing to do with `free(next)` on line 76, so the note was not needed. The warning itself is unchanged and is still questionable: the loop stops when `next == base`, and the other list nodes are heap-allocated. Users see essentially the same diagnostic either way. ---- 6 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpalert/arpalert_2.0.12.orig.tar.gz Result: your arpalert-2.0.12/capture.c:355:29: warning: If memory allocation fails, then there is a possible null pointer dereference: parse [nullPointerOutOfMemory] arpalert-2.0.12/capture.c:345:16: note: Assuming allocation function fails arpalert-2.0.12/capture.c:345:16: note: Assignment 'base=strdup(config[CF_IF].valeur.string)', assigned value is 0 arpalert-2.0.12/capture.c:346:11: note: Assignment 'parse=base', assigned value is 0 arpalert-2.0.12/capture.c:355:29: note: Null pointer dereference Explanation: `parse = base = strdup(...)`. If strdup fails and parse is NULL, the first dereference is `*parse` at line 350 in the first iteration, and that is not reported. At line 355, `*parse` is only evaluated when `state == 1`. That state is set only in an earlier iteration, which is followed by `parse++`, so parse can no longer be the NULL from line 346 there. The new warning at 355:29 therefore describes a path that cannot happen: the PR now lets the NULL value reach this point inside the loop. The missing NULL check is a real concern, but this report points to the wrong place on an impossible path, so it is less accurate. Main did not report it. ---- 7 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpalert/arpalert_2.0.12.orig.tar.gz Result: your arpalert-2.0.12/capture.c:355:46: warning: If memory allocation fails, then there is a possible null pointer dereference: parse [nullPointerOutOfMemory] arpalert-2.0.12/capture.c:345:16: note: Assuming allocation function fails arpalert-2.0.12/capture.c:345:16: note: Assignment 'base=strdup(config[CF_IF].valeur.string)', assigned value is 0 arpalert-2.0.12/capture.c:346:11: note: Assignment 'parse=base', assigned value is 0 arpalert-2.0.12/capture.c:355:46: note: Null pointer dereference Explanation: `parse` can only be NULL (from a failed `strdup`) on the first loop iteration. There `state` is still 0, so `state == 1 && (*parse ...)` at line 355 short-circuits and never dereferences `parse`. Any NULL dereference would already happen at line 350 (`*parse != ','`). On later iterations `parse` has been incremented, so it is no longer NULL. The new warning at 355:46 needs `state == 1` together with `parse == NULL`, which is impossible. The PR's change to how paths are joined appears to have lost the correlation with `state`, giving a false positive. ---- 8 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpalert/arpalert_2.0.12.orig.tar.gz Result: your arpalert-2.0.12/capture.c:356:9: warning: If memory allocation fails, then there is a possible null pointer dereference: parse [nullPointerOutOfMemory] arpalert-2.0.12/capture.c:345:16: note: Assuming allocation function fails arpalert-2.0.12/capture.c:345:16: note: Assignment 'base=strdup(config[CF_IF].valeur.string)', assigned value is 0 arpalert-2.0.12/capture.c:346:11: note: Assignment 'parse=base', assigned value is 0 arpalert-2.0.12/capture.c:355:23: note: Assuming condition is true arpalert-2.0.12/capture.c:356:9: note: Null pointer dereference Explanation: `parse` can be NULL only on the first loop iteration, right after `parse = base = strdup(...)`. On that iteration `state` is 0, so the `state == 1` branch at line 355 cannot be taken. By the time `state` is 1, `parse` has already been incremented at line 385 at least once. The reported path (parse is 0 at 345/346, then 'Assuming condition is true' at 355 leads to a dereference at 356) is therefore infeasible. The real unchecked-strdup dereference happens earlier, at line 350, and is not what this warning reports. The new warning comes from the PR losing track of the loop state and is a false positive at this location. ---- 9 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpalert/arpalert_2.0.12.orig.tar.gz Result: your arpalert-2.0.12/capture.c:385:10: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] arpalert-2.0.12/capture.c:345:16: note: Assuming allocation function fails arpalert-2.0.12/capture.c:345:16: note: Assignment 'base=strdup(config[CF_IF].valeur.string)', assigned value is 0 arpalert-2.0.12/capture.c:346:11: note: Assignment 'parse=base', assigned value is 0 arpalert-2.0.12/capture.c:379:19: note: Assuming condition is false arpalert-2.0.12/capture.c:385:10: note: Null pointer addition Explanation: This is the same nullPointerArithmeticOutOfMemory warning at capture.c:385 that main also reports. Only the note path changed: main says 'Assuming condition is true' at line 350, the PR says 'Assuming condition is false' at line 379. Either way the scenario is the same. If strdup fails, parse is NULL, and every path reaches 'parse++' only after '*parse' has already been read in the if/else-if conditions. Neither trace is clearly more accurate than the other, and the warning's severity and text are unchanged. So the difference does not matter to users. ---- 10 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/arpalert/arpalert_2.0.12.orig.tar.gz Result: your arpalert-2.0.12/macname.c:76:11: error: Deallocation of a global variable (macname_base) results in undefined behaviour. [autovarInvalidDeallocation] arpalert-2.0.12/macname.c:68:11: note: Address of variable taken here. arpalert-2.0.12/macname.c:70:12: note: Assuming condition is true arpalert-2.0.12/macname.c:76:11: note: Deallocating memory that was not dynamically allocated Explanation: The same autovarInvalidDeallocation warning at macname.c:76 is reported by both main and the PR. The only difference is that the error path no longer has the 'Assuming condition is true' note at line 73. That note was irrelevant anyway: free(next) at line 76 runs whatever the 'next->name != NULL' check gives. The warning itself is still a false positive. The loop runs only while next != base, so 'next' is never the address of the global macname_base[i]. The reported warning and its correctness are unchanged; only the path notes were reshuffled, which does not matter to users. ---- 11 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/bibledit/bibledit_5.1.059.orig.tar.gz Result: main bibledit-5.1.059/sqlite/sqlite3.c:63175:7: style: Condition '!useWal' is always false [knownConditionTrueFalse] Explanation: This is SQLite's walTryBeginRead(). The block before line 63175 is guarded by `if( !useWal )`. Inside it, the function returns only when rc!=SQLITE_OK or when bShmUnreliable is set. When walIndexReadHdr succeeds and the shm is reliable, the block falls through with useWal==0, so `!useWal` at line 63175 can be true. Main apparently treated the block as always escaping, which made the condition look always false. The PR tracks partially escaping paths more accurately, so removing this false positive is an improvement. ---- 12 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bibledit/bibledit_5.1.059.orig.tar.gz Result: main bibledit-5.1.059/tidy/parser.c:648:9: warning: Either the condition 'node' is redundant or there is possible null pointer dereference: node. [nullPointerRedundantCheck] bibledit-5.1.059/tidy/parser.c:1704:14: note: Assuming that condition 'node' is not redundant bibledit-5.1.059/tidy/parser.c:1700:33: note: Calling function 'InsertMisc', 2nd argument 'node' value is 0 bibledit-5.1.059/tidy/parser.c:648:9: note: Null pointer dereference Explanation: Both main and the PR report the same nullPointerRedundantCheck at parser.c:648:9, where InsertMisc() dereferences 'node'. Only the reported error path changed: main traced it from the call at line 1700 with the check at 1704, the PR traces it from the call at line 977 with the check at 981. Cppcheck reports one warning per location, so this is most likely just a different call site being chosen as the path, not a removed or added finding. The warning itself is unchanged for users. The surrounding call-site code is not shown, so it cannot be judged whether either path is a real bug. ---- 13 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bibledit/bibledit_5.1.059.orig.tar.gz Result: your bibledit-5.1.059/tidy/clean.c:1990:14: warning: Either the condition 'node' is redundant or there is possible null pointer dereference: node. [nullPointerRedundantCheck] bibledit-5.1.059/tidy/clean.c:1978:14: note: Assuming that condition 'node' is not redundant bibledit-5.1.059/tidy/clean.c:1990:14: note: Null pointer dereference Explanation: The `node` check at 1978 comes from the `nodeIsLINK(node)` macro, which expands to roughly `node && node->tag && ...`. By that point `node` has already been dereferenced unconditionally (`node->tag` at 1957, `node->type` at 1965), and every path that reassigns it ends in `continue`. So `node` cannot be null at 1990. The redundant null test is only a generic macro guard, not a sign that the author expects null here. Main did not report this; the PR's new partial-escape handling of the `if (nodeIsLINK(node)) { ... continue; }` block now carries the null value from the macro's false path to line 1990. The result is a new, practically false nullPointerRedundantCheck. ---- 14 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bibledit/bibledit_5.1.059.orig.tar.gz Result: your bibledit-5.1.059/tidy/clean.c:1990:42: warning: Either the condition 'node' is redundant or there is possible null pointer dereference: node. [nullPointerRedundantCheck] bibledit-5.1.059/tidy/clean.c:1978:14: note: Assuming that condition 'node' is not redundant bibledit-5.1.059/tidy/clean.c:1990:42: note: Null pointer dereference Explanation: Line 1990 is a new false positive. The 'node' condition at line 1978 comes from the tidy macro nodeIsLINK(node), which expands to a defensive '(node) && (node)->tag && ...' check. It does not mean node can really be NULL there. By line 1978, node has already been dereferenced unconditionally at line 1957 ('node->tag') and line 1965 ('node->type'). Every branch that reassigns node in between ends with 'continue'. So node cannot be NULL at line 1990. The PR's new path-splitting logic lets a 'node is null' value reach this point, which main did not report. ---- 15 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/b/bibledit/bibledit_5.1.059.orig.tar.gz Result: your bibledit-5.1.059/tidy/parser.c:648:9: warning: Either the condition 'node' is redundant or there is possible null pointer dereference: node. [nullPointerRedundantCheck] bibledit-5.1.059/tidy/parser.c:981:14: note: Assuming that condition 'node' is not redundant bibledit-5.1.059/tidy/parser.c:977:34: note: Calling function 'InsertMisc', 2nd argument 'node' value is 0 bibledit-5.1.059/tidy/parser.c:648:9: note: Null pointer dereference Explanation: The same nullPointerRedundantCheck at parser.c:648 (InsertMisc dereferencing 'node') is reported before and after the PR. Only the error path changed. Main traced it through the call at 1700 and the check at 1704; the PR traces it through the call at 977 and the check at 981. The code at 977/981 is not shown, so it cannot be confirmed which caller can really pass a null 'node'. In the usual tidy code InsertMisc is called inside a loop like 'while ((node = GetToken(...)) != NULL)', so both paths may well be the same kind of false positive. The user still sees one warning at the same location, so the change in which caller is cited does not clearly matter either way. ---- 16 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: main binutils-2.35.1/bfd/elf32-score7.c:1930:18: style: Condition '!merge_p' is always true [knownConditionTrueFalse] binutils-2.35.1/bfd/elf32-score7.c:1845:25: note: Assignment 'merge_p=0', assigned value is 0 binutils-2.35.1/bfd/elf32-score7.c:1930:18: note: Condition '!merge_p' is always true Explanation: merge_p starts as 0 at line 1845, but lines 1896-1898 set it to 1 when the section has SEC_MERGE and the symbol is STT_SECTION. That assignment is in the local-symbol block. So at line 1930, `local_p && !merge_p` can be false when local_p is true, and '!merge_p' is not always true. Main reported a false positive: it lost track of the path through the nested 'merge_p = 1' assignment. The PR follows that path correctly, so removing the warning is an improvement. ---- 17 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: main binutils-2.35.1/binutils/winduni.c:228:12: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] binutils-2.35.1/binutils/winduni.c:216:30: note: Assuming allocation function fails binutils-2.35.1/binutils/winduni.c:216:11: note: Assignment 'p=tmp=(char*)xmalloc(a_length+1)', assigned value is 0 binutils-2.35.1/binutils/winduni.c:226:16: note: Assuming condition is true binutils-2.35.1/binutils/winduni.c:228:12: note: Null pointer dereference Explanation: The same nullPointerOutOfMemory warning at winduni.c:228 is reported before and after the change. Only the error path differs: the old path had a note 'Assuming condition is true' for 'if (tlen > a_length) tlen = a_length;' at line 226. That condition only changes tlen, not p, and *p is dereferenced at line 228 on both outcomes. The note was misleading, and the new path leaves it out, so the message is more accurate. The warning itself is questionable, since binutils' xmalloc never returns NULL, but the PR does not change whether it is reported. ---- 18 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: main binutils-2.35.1/gas/config/tc-s12z.c:501:23: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] binutils-2.35.1/gas/config/tc-s12z.c:497:11: note: Assuming that condition 'c<0' is not redundant binutils-2.35.1/gas/config/tc-s12z.c:501:23: note: Shifting a negative value is technically undefined behaviour Explanation: The warning (same location, same id) is still reported; only the cited condition changed. The listed source is offset by about 6 lines, so the real line is the `c >> (8 * ...)` shift, and `c` can indeed be negative. Main cited the nearby `c < 0` check. The PR cites `c >= -256`, which also allows negative c (e.g. -256). Both explanations are valid, so the change in the supporting note does not matter much to users. ---- 19 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: your binutils-2.35.1/binutils/winduni.c:228:12: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] binutils-2.35.1/binutils/winduni.c:216:30: note: Assuming allocation function fails binutils-2.35.1/binutils/winduni.c:216:11: note: Assignment 'p=tmp=(char*)xmalloc(a_length+1)', assigned value is 0 binutils-2.35.1/binutils/winduni.c:228:12: note: Null pointer dereference Explanation: The warning at line 228 (deref of p after a failed xmalloc) is reported by both versions; only the error path changed. Main included the note 'Assuming condition is true' at line 226 (`tlen > a_length`). That condition has nothing to do with the null dereference: `*p` at line 228 is reached whether or not tlen is clamped. The new path drops this irrelevant assumption, so the message is slightly more accurate. Whether the warning itself is useful is unchanged, since xmalloc never returns NULL in binutils. ---- 20 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: your binutils-2.35.1/gas/config/tc-cris.c:1064:7: warning: Uninitialized variable: max_minimal_minus_distance [uninitvar] binutils-2.35.1/gas/config/tc-cris.c:1039:17: note: Assuming condition is false binutils-2.35.1/gas/config/tc-cris.c:1047:22: note: Assuming condition is true binutils-2.35.1/gas/config/tc-cris.c:1064:7: note: Uninitialized variable: max_minimal_minus_distance Explanation: The warning says 'max_minimal_minus_distance' can be used uninitialized, and it is a false positive. The variable is assigned in the 'arch_crisv32' branch and in the final else branch. The only other branch, 'cris_arch == arch_cris_common_v10_v32', calls as_fatal(), which binutils declares noreturn. So line 1064 is never reached with the variable uninitialized. Main handled this path as a possible or unknown escape and did not warn. The PR's new path-splitting logic now carries the uninitialized state past the as_fatal() call. ---- 21 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: your binutils-2.35.1/gas/config/tc-s12z.c:501:23: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] binutils-2.35.1/gas/config/tc-s12z.c:485:23: note: Assuming that condition 'c>=-256' is not redundant binutils-2.35.1/gas/config/tc-s12z.c:501:23: note: Shifting a negative value is technically undefined behaviour Explanation: The same shiftNegativeLHS warning at line 501 is reported by both main and the PR. Only the supporting note changed: main cites the condition 'c<0', the PR cites 'c>=-256'. Both notes describe a condition implying c may be negative, so neither is clearly more accurate than the other. The shifted expression shown, (reg - REG_X) << 4, takes reg from lex_reg_name(REG_BIT_XYSP), which should be >= REG_X, so the warning looks doubtful either way. The diagnostic itself did not appear or disappear, so the change hardly matters to users. ---- 22 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: your binutils-2.35.1/zlib/contrib/minizip/mztools.c:197:25: style: Condition 'comsize>0' is always false [knownConditionTrueFalse] binutils-2.35.1/zlib/contrib/minizip/mztools.c:150:27: note: Assignment 'comment=""', assigned value is "" binutils-2.35.1/zlib/contrib/minizip/mztools.c:151:25: note: Assignment 'comsize=(int)strlen(comment)', assigned value is 0 binutils-2.35.1/zlib/contrib/minizip/mztools.c:170:46: note: Assuming condition is true binutils-2.35.1/zlib/contrib/minizip/mztools.c:174:24: note: Assuming condition is true binutils-2.35.1/zlib/contrib/minizip/mztools.c:175:56: note: Assuming condition is true binutils-2.35.1/zlib/contrib/minizip/mztools.c:197:25: note: Condition 'comsize>0' is always false Explanation: In this block of minizip's mztools.c, `comment` is a local set to "" and `comsize = (int)strlen(comment)` is therefore 0. Nothing changes `comsize` before line 197: the WRITE_16 macros only read it, and the code in between is fwrite calls and branches that break out of the loop. So `comsize > 0` really is always false; the comment-writing code is dead because the comment string was left empty on purpose. The new warning is a true positive that main missed. The "Assuming condition is true" notes on the path are extra, but they do not change the value. ---- 23 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bladerf/bladerf_0.2025.10.orig.tar.xz Result: main bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:185:58: warning:inconclusive: Possible null pointer dereference: dataDac [nullPointer] bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:168:33: note: Assignment 'dataDac=0', assigned value is 0 bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:171:16: note: Assuming condition is true bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:173:21: note: Assuming condition is true bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:185:58: note: Null pointer dereference Explanation: The code sets dataDac = 0, passes it by value to ad7685_GetConversion (which cannot change the local pointer), and then dereferences dataDac[adcNo-1]. The warning is a true positive on both versions. Only the error path changed. The old path said 'Assuming condition is true' at line 173 (param[0] < 1), which plays no part in the null dereference: the null value reaches line 185 whether or not that if is taken. The new path drops this irrelevant step and keeps only the outer paramNo >= 1 condition. The message is now more accurate. ---- 24 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bladerf/bladerf_0.2025.10.orig.tar.xz Result: main bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:222:46: warning:inconclusive: Possible null pointer dereference: dataDac [nullPointer] bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:205:33: note: Assignment 'dataDac=0', assigned value is 0 bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:208:16: note: Assuming condition is true bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:210:21: note: Assuming condition is true bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:222:46: note: Null pointer dereference Explanation: dataDac is initialized to null at line 205 and passed by value to ad7685_GetConversion, so it is still null when dereferenced at line 222. This is a real bug. The warning itself is kept: the main and your lines differ only in the error path. The old path included the note 'Assuming condition is true' at line 210 ('if(param[0] < 1)'), but that condition does not affect dataDac. The null dereference happens whether or not that if is taken. The new path names only the relevant condition (paramNo >= 1), so the message is more accurate. ---- 25 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/b/bladerf/bladerf_0.2025.10.orig.tar.xz Result: main bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/drivers/AD9517/AD9517.c:557:15: style: Condition 'channel>=0' is always true [knownConditionTrueFalse] bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/drivers/AD9517/AD9517.c:516:14: note: Assuming that condition 'channel>=0' is not redundant bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/drivers/AD9517/AD9517.c:557:15: note: Condition 'channel>=0' is always true Explanation: The warning itself is unchanged. Line 516 already checks 'channel>=0', so 'channel>=0' at line 557 is always true inside that block whatever 'divider' is. The PR only changes the error path: it adds the note 'Assuming condition is true' at line 518 ('if(divider == 0)'). That condition has no bearing on 'channel', so the new note wrongly suggests the result depends on taking that branch. The value now seems to arrive via the forked then-path rather than the joined path. The message is slightly less accurate, a minor regression. ---- 26 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bladerf/bladerf_0.2025.10.orig.tar.xz Result: your bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:185:58: warning:inconclusive: Possible null pointer dereference: dataDac [nullPointer] bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:168:33: note: Assignment 'dataDac=0', assigned value is 0 bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:171:16: note: Assuming condition is true bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:185:58: note: Null pointer dereference Explanation: In GetAdcCode, dataDac is initialized to 0 and passed by value to ad7685_GetConversion(2, dataDac). The callee cannot change the caller's pointer, so dataDac[adcNo - 1] at line 185 dereferences a null pointer whenever paramNo >= 1. The warning is a true positive in both versions. The only change is the error path: the irrelevant 'Assuming condition is true' note for 'param[0] < 1' at line 173 is gone. The null dereference happens regardless of that condition, so the new path is shorter and more accurate. ---- 27 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bladerf/bladerf_0.2025.10.orig.tar.xz Result: your bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:222:46: warning:inconclusive: Possible null pointer dereference: dataDac [nullPointer] bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:205:33: note: Assignment 'dataDac=0', assigned value is 0 bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:208:16: note: Assuming condition is true bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/device_commands/CN0194/Command.c:222:46: note: Null pointer dereference Explanation: The warning is the same before and after: dataDac is initialized to 0 and is passed by value to ad7685_GetConversion, which cannot change the pointer, so dataDac[adcNo - 1] really dereferences a null pointer. This is a true positive. Only the note path changed. It no longer includes 'Assuming condition is true' for 'if(param[0] < 1)' at line 210. That if only clamps param[0] and has nothing to do with dataDac being null. The null dereference happens whether or not that block runs. The shorter path is therefore more accurate, which makes this a small improvement to the message. ---- 28 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bladerf/bladerf_0.2025.10.orig.tar.xz Result: your bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/drivers/AD9517/AD9517.c:557:15: style: Condition 'channel>=0' is always true [knownConditionTrueFalse] bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/drivers/AD9517/AD9517.c:516:14: note: Assuming that condition 'channel>=0' is not redundant bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/drivers/AD9517/AD9517.c:518:14: note: Assuming condition is true bladerf-0.2025.10/thirdparty/analogdevicesinc/no-OS/drivers/AD9517/AD9517.c:557:15: note: Condition 'channel>=0' is always true Explanation: Both versions report the same warning: 'channel>=0' at line 557 is always true, because it sits inside the block guarded by 'channel>=0' at line 516. Only the error path changed. The PR adds the note 'Assuming condition is true' for 'if(divider == 0)' at line 518. That condition has nothing to do with 'channel'. The redundancy holds whether or not the divider==0 block runs, so the note implies a dependency that does not exist. This comes from the new fork carrying the then-path value past the if. The warning is still correct, but its explanation is slightly less accurate. ---- 29 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/blastem/blastem_0.6.3.4.orig.tar.gz Result: your blastem-0.6.3.4/genesis.c:684:9: warning: Uninitialized variable: value [uninitvar] blastem-0.6.3.4/genesis.c:649:15: note: Assuming condition is false blastem-0.6.3.4/genesis.c:671:22: note: Assuming condition is true blastem-0.6.3.4/genesis.c:684:9: note: Uninitialized variable: value Explanation: The only path where 'value' is left unassigned is the branch at 671 (0x10 <= vdp_port < 0x18), which calls fatal_error(). In blastem, fatal_error() logs the message and exits, so it never returns and the return at 684 cannot be reached with 'value' uninitialized. Main treated this unknown, possibly noreturn call as stopping the path, so it gave no warning. The PR's new path handling lets that path reach the return, which adds a false positive. ---- 30 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/bluefish/bluefish_2.4.2.orig.tar.xz Result: your bluefish-2.4.2/src/plugin_htmlbar/html2.c:1240:6: style: Condition 'tmpstr' is always false [knownConditionTrueFalse] bluefish-2.4.2/src/plugin_htmlbar/html2.c:1213:16: note: Assignment 'tmpstr=NULL', assigned value is 0 bluefish-2.4.2/src/plugin_htmlbar/html2.c:1240:6: note: Condition 'tmpstr' is always false Explanation: `tmpstr` starts as NULL, but line 1226 assigns it the result of `doc_get_chars()` when a 7-character selection exists. So it can be non-NULL at line 1240, and the `if (tmpstr)` check is needed. The new 'always false' warning is a false positive. The PR's new path-splitting and joint-result logic for nested ifs dropped the modified path through the inner `if ((endpos - startpos) == 7)` block and kept the known NULL value. ---- 31 / 291 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cbmc/cbmc_6.6.0.orig.tar.gz Result: main cbmc-cbmc-6.6.0/regression/goto-analyzer/unreachable_assertions_01/main.c:26:8: style: Condition 'a==b' is always false [knownConditionTrueFalse] cbmc-cbmc-6.6.0/regression/goto-analyzer/unreachable_assertions_01/main.c:7:11: note: Assignment 'a=1', assigned value is 1 cbmc-cbmc-6.6.0/regression/goto-analyzer/unreachable_assertions_01/main.c:26:8: note: Condition 'a==b' is always false Explanation: `a` is initialized to 1 and `b` to 2. Neither is modified anywhere in main(); the preceding `if(a == b)` blocks only call `__CPROVER_assert`. So `a == b` at line 26 really is always false, and main's knownConditionTrueFalse warning was a true positive. The PR changes how forward analysis tracks forks and budgets across the earlier undecided ifs, and that seems to drop the known value of `a` by the fifth identical condition. Losing a correct warning is a new false negative, not a false positive being fixed. ---- 32 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/cgal/cgal_6.2.1.orig.tar.xz Result: your CGAL-6.2.1/demo/Lab/Plugins/PMP/Triangulate_facets_plugin.cpp:136:9: warning: Either the condition 'sm_item' is redundant or there is possible null pointer dereference: sm_item. [nullPointerRedundantCheck] CGAL-6.2.1/demo/Lab/Plugins/PMP/Triangulate_facets_plugin.cpp:113:13: note: Assuming that condition 'sm_item' is not redundant CGAL-6.2.1/demo/Lab/Plugins/PMP/Triangulate_facets_plugin.cpp:136:9: note: Null pointer dereference Explanation: The new warning needs a path where `sm_item` is null at line 113 and `selection_item` is also null, so that the else-if is skipped and `sm_item` stays null at line 136. That path is impossible. When `sm_item` is null, line 101 has already called `selection_item->polyhedron()`, so `selection_item` must be non-null. The else-if branch is then taken and `sm_item` is reassigned from `selection_item->polyhedron_item()`. Cppcheck does not connect the dereference at line 101 with the `else if (selection_item)` check, so the PR's new partial-path tracking reports an infeasible null dereference. This is a new false positive. ---- 33 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/chuck/chuck_1.5.5.9.orig.tar.xz Result: main chuck-1.5.5.9/src/core/lo/server.c:662:19: style: Condition 'group!=NULL' is always true [knownConditionTrueFalse] Explanation: `group` is a function parameter that can legitimately be NULL (non-multicast servers), and lines 640 and 650 test it without a warning. Nothing between those tests and line 662 forces `group` to be non-NULL. The only exits in between are the `return NULL` on a reuseaddr error and an ignored reuseport failure. Neither makes `group != NULL` always true at line 662. Main most likely mis-derived the value from the nested `if (err) return` paths inside the earlier blocks, which is the multi-path pattern the PR fixes. Removing the warning removes a false positive. ---- 34 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: main code-saturne-7.0.2.orig/src/atmo/cs_at_opt_interp.c:1656:7: warning:inconclusive: Possible null pointer dereference: inc [nullPointer] code-saturne-7.0.2.orig/src/atmo/cs_at_opt_interp.c:1646:20: note: Assignment 'inc=NULL', assigned value is 0 code-saturne-7.0.2.orig/src/atmo/cs_at_opt_interp.c:1656:7: note: Null pointer dereference Explanation: `inc` is set to NULL and then immediately allocated by `BFT_MALLOC(inc, a_l_size, cs_real_t)`. That macro assigns the result of `bft_mem_malloc` to `inc`. So at line 1656 `inc` is not NULL, and the inconclusive nullPointer warning was a false positive. Its removal is an improvement for users. ---- 35 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: main code-saturne-7.0.2.orig/src/atmo/cs_at_opt_interp.c:1660:9: warning:inconclusive: Possible null pointer dereference: inc [nullPointer] code-saturne-7.0.2.orig/src/atmo/cs_at_opt_interp.c:1646:20: note: Assignment 'inc=NULL', assigned value is 0 code-saturne-7.0.2.orig/src/atmo/cs_at_opt_interp.c:1660:9: note: Null pointer dereference Explanation: `inc` is set to NULL and then allocated through `BFT_MALLOC(inc, a_l_size, cs_real_t)`, a macro that assigns the allocated buffer to `inc`. The dereference `inc[ii] -= ...` at line 1660 therefore operates on allocated memory, not on NULL. The removed inconclusive nullPointer warning was a false positive, so removing it is an improvement. ---- 36 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: main code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2148:12: warning:inconclusive: Possible null pointer dereference: _g_face_cells [nullPointer] code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2113:30: note: Assignment '_g_face_cells=NULL', assigned value is 0 code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2133:29: note: Assuming condition is true code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2142:35: note: Assuming condition is true code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2148:12: note: Null pointer dereference Explanation: This is not a removed warning. The same inconclusive nullPointer warning for `_g_face_cells` at line 2148 is still reported by the PR (it appears as a 'your' line). Only the error path changed: the note 'Assuming condition is true' for line 2142 was dropped. That condition only decides `_n_b_faces` and does not decide whether line 2148 is reached, so the shorter path is, if anything, slightly cleaner. The warning itself is the same either way: it comes from the 2113 NULL init, followed by `BFT_MALLOC` (probably an unexpanded macro) and then `memcpy`. For users the reported issue is unchanged. ---- 37 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: your code-saturne-7.0.2.orig/preprocessor/base/ecs_table_att.c:212:28: warning:inconclusive: Possible null pointer dereference: pos_att_new [nullPointer] code-saturne-7.0.2.orig/preprocessor/base/ecs_table_att.c:181:30: note: Assignment 'pos_att_new=NULL', assigned value is 0 code-saturne-7.0.2.orig/preprocessor/base/ecs_table_att.c:212:28: note: Null pointer dereference Explanation: `pos_att_new` is initialised to NULL at line 181 but reassigned by `ECS_MALLOC` at line 190. It is then used at lines 195, 203 and 210 before the loop at 212. Cppcheck flags none of those earlier uses, yet the PR now reports a possible null dereference at line 212, which only makes sense if the NULL value survived the allocation. The NULL from line 181 cannot reach line 212, so this is a new false positive caused by the changed path merging in forward analysis. ---- 38 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: your code-saturne-7.0.2.orig/preprocessor/base/ecs_table_att.c:212:5: warning:inconclusive: Possible null pointer dereference: pos_att_new [nullPointer] code-saturne-7.0.2.orig/preprocessor/base/ecs_table_att.c:181:30: note: Assignment 'pos_att_new=NULL', assigned value is 0 code-saturne-7.0.2.orig/preprocessor/base/ecs_table_att.c:212:5: note: Null pointer dereference Explanation: `pos_att_new` is allocated with `ECS_MALLOC` at line 190 before any use, and it is dereferenced unconditionally at lines 195, 203 and 210 without any warning. Reporting it as possibly NULL only at line 212 means the stale `NULL` value from line 181 now leaks past the loops through the new path handling. This is a new false positive. ---- 39 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: your code-saturne-7.0.2.orig/src/alge/cs_matrix_util.c:544:18: style: Condition 'sii>-1.e-18' is always true [knownConditionTrueFalse] code-saturne-7.0.2.orig/src/alge/cs_matrix_util.c:534:22: note: Assignment 'sii=0.0', assigned value is 0.0 code-saturne-7.0.2.orig/src/alge/cs_matrix_util.c:542:15: note: Assuming condition is false code-saturne-7.0.2.orig/src/alge/cs_matrix_util.c:544:18: note: Condition 'sii>-1.e-18' is always true Explanation: In the normalize loop, `sii` is initialized to 0.0 on line 534 and nothing assigns it before line 544. The loop at lines 538-541 only changes `d_val`. So when the else-if is reached, `sii` is 0.0, and `sii > -1.e-18` is always true. The new warning is a true positive and points to a real bug: `sii` was probably meant to come from `dd[ii]`. The PR now keeps the known value past the inner loop and if. ---- 40 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: your code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2148:12: warning:inconclusive: Possible null pointer dereference: _g_face_cells [nullPointer] code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2113:30: note: Assignment '_g_face_cells=NULL', assigned value is 0 code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2133:29: note: Assuming condition is true code-saturne-7.0.2.orig/src/mesh/cs_partition.c:2148:12: note: Null pointer dereference Explanation: Both versions report the same inconclusive nullPointer warning at line 2148; only the error path differs. The new path drops the note 'Assuming condition is true' at line 2142. That condition only sets `_n_b_faces` and has no bearing on `_g_face_cells`, so the removed note was irrelevant. The warning itself is likely a false positive in both versions: `BFT_MALLOC` is a macro that assigns `_g_face_cells`, and Cppcheck apparently treats it as an unknown call. The PR neither adds nor removes the warning, so the change does not matter to users. ---- 41 / 291 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/c/code-saturne/code-saturne_7.0.2+repack.orig.tar.gz Result: your code-saturne-7.0.2.orig/tests/cs_moment_test.c:51:16: warning: If memory allocation fails, then there is a possible null pointer dereference: x [nullPointerOutOfMemory] code-saturne-7.0.2.orig/tests/cs_moment_test.c:95:24: note: Assuming allocation function fails code-saturne-7.0.2.orig/tests/cs_moment_test.c:95:24: note: Assignment 'wx=malloc(nr*sizeof(double))', assigned value is 0 code-saturne-7.0.2.orig/tests/cs_moment_test.c:102:33: note: Calling function '_sum_kahan', 2nd argument 'wx' value is 0 code-saturne-7.0.2.orig/tests/cs_moment_test.c:51:16: note: Null pointer dereference Explanation: Line 95 does `wx = malloc(...)`, and line 102 passes `wx` to `_sum_kahan(nr, wx)` with nr = 50. `_sum_kahan` then reads `x[i]`. This test file never checks its malloc results (see lines 77-79), so if the allocation fails a NULL pointer is dereferenced at line 51. That makes this a valid nullPointerOutOfMemory finding of the same kind Cppcheck already reports for unchecked mallocs. The PR's better path tracking plausibly keeps the NULL value alive through an if in lines 96-101. Those lines are not shown, so a guard or an earlier dereference cannot be ruled out, hence low confidence. ---- 42 / 291 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/c/coinor-cbc/coinor-cbc_2.10.13+ds.orig.tar.xz Result: main Cbc-releases-2.10.13/Cbc/examples/CbcSolver3.cpp:90:22: style: Condition 'algorithm_==1' is always true [knownConditionTrueFalse] Cbc-releases-2.10.13/Cbc/examples/CbcSolver3.cpp:72:18: note: Assuming that condition 'algorithm_==0' is not redundant Cbc-releases-2.10.13/Cbc/examples/CbcSolver3.cpp:87:29: note: Assuming condition is true Cbc-releases-2.10.13/Cbc/examples/CbcSolver3.cpp:90:22: note: Condition 'algorithm_==1' is always true Explanation: The same knownConditionTrueFalse warning at line 90 is still reported. Only its error path changed: the PR drops the note 'Assuming condition is true' at line 87:29. That note is about 'colLower[iColumn] == colUpper[iColumn]', which has nothing to do with the value of algorithm_. So the new message is slightly more accurate. The warning itself looks dubious in both versions, because the else branch of 'algorithm_ == 0' still allows values other than 1 (line 93 handles that case), but the PR does not change whether it is reported. The difference is a minor message cleanup. ---- 43 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/coinor-cbc/coinor-cbc_2.10.13+ds.orig.tar.xz Result: your Cbc-releases-2.10.13/Cbc/examples/CbcSolver3.cpp:90:22: style: Condition 'algorithm_==1' is always true [knownConditionTrueFalse] Cbc-releases-2.10.13/Cbc/examples/CbcSolver3.cpp:72:18: note: Assuming that condition 'algorithm_==0' is not redundant Cbc-releases-2.10.13/Cbc/examples/CbcSolver3.cpp:90:22: note: Condition 'algorithm_==1' is always true Explanation: Both main and the PR report the same 'algorithm_==1 is always true' warning at line 90. Only the note chain differs: the PR drops the unrelated 'Assuming condition is true' note at line 87. In the else branch of 'algorithm_ == 0', algorithm_ is only known to be non-zero, and line 93 explicitly handles other values. So the warning looks like a false positive in both versions. The PR neither adds nor removes it, and the dropped note was irrelevant anyway, so the change does not matter to users. ---- 44 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/coinor-cbc/coinor-cbc_2.10.13+ds.orig.tar.xz Result: your Cbc-releases-2.10.13/Cbc/src/CbcSolver.cpp:9898:38: style: Condition 'numberGlpkRows>numberRows' is always true [knownConditionTrueFalse] Cbc-releases-2.10.13/Cbc/src/CbcSolver.cpp:9852:38: note: numberGlpkRows is assigned 'numberRows+1' here. Cbc-releases-2.10.13/Cbc/src/CbcSolver.cpp:9871:29: note: Assuming condition is true Cbc-releases-2.10.13/Cbc/src/CbcSolver.cpp:9898:38: note: Condition 'numberGlpkRows>numberRows' is always true Explanation: Line 9852 sets `numberGlpkRows = numberRows + 1`. The only code that can change it is inside the `#ifdef COIN_HAS_GLPK` block that ends at line 9861. In the configuration where COIN_HAS_GLPK is not defined, nothing between 9852 and 9898 writes `numberGlpkRows` or `numberRows`. The `iStat` if/else chain only assigns `iStat2`. So `numberGlpkRows > numberRows` really is always true in that configuration. Main presumably lost the value while walking the if/else chain; the PR keeps it. The finding is a configuration-dependent but genuine true positive. The 'Assuming condition is true' note at 9871 is unneeded but does not make the conclusion wrong. ---- 45 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/coinor-csdp/coinor-csdp_6.2.0.orig.tar.gz Result: your Csdp-6.2.0/lib/op_o.c:100:8: error: Array 'work[3]' accessed at index 4, which is out of bounds. [arrayIndexOutOfBounds] Csdp-6.2.0/lib/op_o.c:85:12: note: Assign work, buffer with size 24 Csdp-6.2.0/lib/op_o.c:87:16: note: Assuming condition is false Csdp-6.2.0/lib/op_o.c:95:16: note: Assignment 'i=1', assigned value is 1 Csdp-6.2.0/lib/op_o.c:100:8: note: Array index out of bounds Explanation: The buffer size of 24 bytes (3 pointers) comes from max_threads == 1, which is set in the non-OpenMP #else branch. With max_threads == 1, the loop 'for (i = 1; i < max_threads; i++)' never runs, so work[3] and work[4] are never accessed. In the OpenMP configuration, the array has max_threads*2+1 elements and the indexes up to (max_threads-1)*2+2 stay within it. The new arrayIndexOutOfBounds warnings combine the size from max_threads == 1 with a loop body that is only entered when max_threads > 1. They are false positives that the PR's changes to path and value handling introduced. ---- 46 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/coinor-csdp/coinor-csdp_6.2.0.orig.tar.gz Result: your Csdp-6.2.0/lib/op_o.c:103:12: error: Array 'work[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds] Csdp-6.2.0/lib/op_o.c:85:12: note: Assign work, buffer with size 24 Csdp-6.2.0/lib/op_o.c:87:16: note: Assuming condition is false Csdp-6.2.0/lib/op_o.c:95:16: note: Assignment 'i=1', assigned value is 1 Csdp-6.2.0/lib/op_o.c:103:12: note: Array index out of bounds Explanation: The buffer size of 24 bytes means Cppcheck takes max_threads == 1 (8 * (1*2+1)). With max_threads == 1 the loop `for (i = 1; i < max_threads; i++)` never runs, so `work[3]` and `work[4]` are never accessed at line 103. Cppcheck combines the known allocation size with i=1 inside a loop body that cannot execute under that same value. The new arrayIndexOutOfBounds warning is a false positive caused by the PR's forward-analysis change. ---- 47 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/coinor-csdp/coinor-csdp_6.2.0.orig.tar.gz Result: your Csdp-6.2.0/lib/op_o.c:97:8: error: Array 'work[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds] Csdp-6.2.0/lib/op_o.c:85:12: note: Assign work, buffer with size 24 Csdp-6.2.0/lib/op_o.c:87:16: note: Assuming condition is false Csdp-6.2.0/lib/op_o.c:95:16: note: Assignment 'i=1', assigned value is 1 Csdp-6.2.0/lib/op_o.c:97:8: note: Array index out of bounds Explanation: Without USEOPENMP, max_threads is 1, so work is allocated for max_threads*2+1 = 3 pointers (24 bytes). The loop 'for (i = 1; i < max_threads; i++)' then runs zero times, because 1 < 1 is false, so work[3] is never accessed. In the OpenMP configuration max_threads is not known, so the buffer size is not 24 either. In both cases the warning claims an index 3 access into a 3-element buffer that cannot happen. This is a new false positive: the PR makes Cppcheck lose track of the loop condition (or of max_threads) after the 'if (work == NULL)' exit path. ---- 48 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/crimson/crimson_0.5.3.orig.tar.gz Result: main crimson-0.5.3/tools/mkunitset.cpp:160:23: style: Condition 'units.size()==0' is always true [knownConditionTrueFalse] crimson-0.5.3/tools/mkunitset.cpp:143:15: note: Assuming condition is true crimson-0.5.3/tools/mkunitset.cpp:145:29: note: Assuming condition is true crimson-0.5.3/tools/mkunitset.cpp:160:23: note: Condition 'units.size()==0' is always true Explanation: `units` is passed by non-const reference to `new UnitHandler(info, units, names)`. That handler is registered with the parser, and `parser.Parse(argv[1])` fills the vector through it. So `units.size()==0` at line 160 is not always true: it depends on the parsed input file. The removed warning was a false positive. Its notes show it came from a path-sensitive assumption at lines 143/145 that does not decide the size of `units`. The PR's more careful handling of paths through the if/else removed it. ---- 49 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cryptcat/cryptcat_20031202.orig.tar.gz Result: your cryptcat-20031202.orig/netcat.c:479:9: style: Condition 'pnum' is always false [knownConditionTrueFalse] cryptcat-20031202.orig/netcat.c:457:7: note: Assuming that condition 'pnum' is not redundant cryptcat-20031202.orig/netcat.c:478:7: note: Assuming condition is true cryptcat-20031202.orig/netcat.c:479:9: note: Condition 'pnum' is always false Explanation: The `if (pnum)` block at line 457 never falls through. It either returns at line 459 or jumps to `gp_finish` (via `goto` at line 462 or 471). So any path that reaches line 478 has `pnum == 0`, and the check `if (pnum)` at line 479 really is always false; it is redundant defensive code. Main missed this, probably because of the `goto`. The new knownConditionTrueFalse warning is a true positive. ---- 50 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dnshistory/dnshistory_1.3.orig.tar.gz Result: main dnshistory-1.3/src/dnshistory.c:1295:9: error: Deallocation of an auto-variable (dnsrec_list) results in undefined behaviour. [autovarInvalidDeallocation] dnshistory-1.3/src/dnshistory.c:1282:28: note: Address of variable taken here. dnshistory-1.3/src/dnshistory.c:1276:71: note: Assuming condition is true dnshistory-1.3/src/dnshistory.c:1272:17: note: Assuming condition is false dnshistory-1.3/src/dnshistory.c:1289:22: note: Assuming condition is false dnshistory-1.3/src/dnshistory.c:1293:9: note: Assuming condition is true dnshistory-1.3/src/dnshistory.c:1295:9: note: Deallocating memory that was not dynamically allocated Explanation: The same autovarInvalidDeallocation warning is reported before and after the PR. The only difference is that the PR drops one error-path note, 'Assuming condition is true' at line 1293, which is the VPRINT verbosity check. That check does not affect whether XFREE(list) at line 1295 runs, so the note was not needed. The warning itself is very likely still a false positive. When the branch at 1276 is taken, dnsrec->list is set to &dnsrec_list, so the check at line 1289 skips the local variable (unless store_dns_records changes dnsrec->list). Because the warning is kept and only a minor path note changes, users see no real difference. ---- 51 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dnshistory/dnshistory_1.3.orig.tar.gz Result: your dnshistory-1.3/src/dnshistory.c:1295:9: error: Deallocation of an auto-variable (dnsrec_list) results in undefined behaviour. [autovarInvalidDeallocation] dnshistory-1.3/src/dnshistory.c:1282:28: note: Address of variable taken here. dnshistory-1.3/src/dnshistory.c:1276:71: note: Assuming condition is true dnshistory-1.3/src/dnshistory.c:1272:17: note: Assuming condition is false dnshistory-1.3/src/dnshistory.c:1289:22: note: Assuming condition is false dnshistory-1.3/src/dnshistory.c:1295:9: note: Deallocating memory that was not dynamically allocated Explanation: The warning is the same in both runs: same location, message and main notes. The only difference is that one 'Assuming condition is true' note at line 1293 is gone. That note comes from the condition inside the VPRINT macro, which has nothing to do with the deallocation. The warning itself is likely a false positive in both versions. After 'dnsrec->list = &dnsrec_list', the check at line 1289 skips the local variable. Cppcheck only reaches the free by assuming that check is false, which seems possible only if store_dns_records() changes dnsrec->list. The PR neither removes nor adds this warning, and the shorter error path makes no real difference to users. ---- 52 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/evolution/evolution_3.62.2.orig.tar.xz Result: main evolution-3.62.2/src/calendar/gui/e-comp-editor-page-recurrence.c:2122:7: style: Condition '!ok' is always false [knownConditionTrueFalse] evolution-3.62.2/src/calendar/gui/e-comp-editor-page-recurrence.c:2085:17: note: Assignment 'ok=!0', assigned value is 1 evolution-3.62.2/src/calendar/gui/e-comp-editor-page-recurrence.c:2087:28: note: Assuming condition is false evolution-3.62.2/src/calendar/gui/e-comp-editor-page-recurrence.c:2122:7: note: Condition '!ok' is always false Explanation: The removed warning says '!ok' is always false at line 2122. That is wrong: when e_date_edit_get_date() returns true, dtstart is valid and the until date is before the start, line 2105 sets ok to false, so the condition can be true. Main reached its claim only by 'assuming condition is false' at line 2087, which ignores the path through the then block that changes ok. The PR now tracks that ok is modified on one of the paths, so this false positive is gone. ---- 53 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/evolution/evolution_3.62.2.orig.tar.xz Result: main evolution-3.62.2/src/em-format/e-mail-parser-message-deliverystatus.c:91:6: style: Condition '!mail_part' is always true [knownConditionTrueFalse] evolution-3.62.2/src/em-format/e-mail-parser-message-deliverystatus.c:43:25: note: Assignment 'mail_part=NULL', assigned value is 0 evolution-3.62.2/src/em-format/e-mail-parser-message-deliverystatus.c:91:6: note: Condition '!mail_part' is always true Explanation: `mail_part` starts as NULL (line 43). Inside the `if (ct && ...)` block it is assigned at line 82 when `success` is true. `success` comes from runtime calls (decode, parser init, header count), so `mail_part` can be non-NULL at line 91. The check `!mail_part` is therefore not always true, and main's knownConditionTrueFalse was a false positive. The PR fixes the path splitting where only some paths reach the end of the block, which removes this false warning. ---- 54 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/examl/examl_3.0.22.orig.tar.gz Result: main ExaML-3.0.22/examl/optimizeModel.c:289:2: warning: If memory allocation fails, then there is a possible null pointer dereference: links [nullPointerOutOfMemory] ExaML-3.0.22/examl/optimizeModel.c:263:26: note: Assuming allocation function fails ExaML-3.0.22/examl/optimizeModel.c:263:14: note: Assignment 'links=(int*)malloc(sizeof(int)*tr->NumberOfModels)', assigned value is 0 ExaML-3.0.22/examl/optimizeModel.c:289:2: note: Null pointer dereference Explanation: `links` comes from `malloc` and is never checked for NULL. If the allocation fails, `links[i] = i` at line 289 dereferences a null pointer (whenever `NumberOfModels > 0`), so the `nullPointerOutOfMemory` warning was a true positive. Nothing between the allocation and line 289 changes `links`. The PR's reworked path splitting (likely around the loop with nested ifs, or the `assert`) now loses the null value before line 289. Losing a true positive makes this a new false negative. ---- 55 / 291 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/f/fcitx-configtool/fcitx-configtool_0.4.10.orig.tar.xz Result: your fcitx-configtool-0.4.10/gtk/configdesc.c:54:12: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: desc [nullPointerOutOfMemory] fcitx-configtool-0.4.10/gtk/configdesc.c:43:26: note: Assuming allocation function fails fcitx-configtool-0.4.10/gtk/configdesc.c:43:26: note: Assignment 'desc=malloc(sizeof(struct ConfigDescSet))', assigned value is 0 fcitx-configtool-0.4.10/gtk/configdesc.c:42:13: note: Assuming condition is true fcitx-configtool-0.4.10/gtk/configdesc.c:40:9: note: Assuming condition is true fcitx-configtool-0.4.10/gtk/configdesc.c:54:12: note: Null pointer dereference Explanation: On the path where the hash lookup misses and the config file opens, `desc = malloc(...)` (line 43) is never checked for NULL. If the allocation fails, `desc->cfdesc` at line 54 dereferences NULL. Path-wise the warning is accurate: no code between line 43 and line 54 reassigns `desc` or checks it, and the `HASH_ADD_KEYPTR` macro only uses it. Main likely lost the value across the branches inside that macro; the PR now keeps it on the path that falls through. Caveat: `memset`/`desc->filename` at lines 44-45 would already fault first, so this largely duplicates the same unchecked-malloc bug rather than finding a new one. It is still a correct inconclusive out-of-memory diagnostic, not a false positive. ---- 56 / 291 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/f/fcitx-configtool/fcitx-configtool_0.4.10.orig.tar.xz Result: your fcitx-configtool-0.4.10/gtk3/configdesc.c:54:12: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: desc [nullPointerOutOfMemory] fcitx-configtool-0.4.10/gtk3/configdesc.c:43:26: note: Assuming allocation function fails fcitx-configtool-0.4.10/gtk3/configdesc.c:43:26: note: Assignment 'desc=malloc(sizeof(struct ConfigDescSet))', assigned value is 0 fcitx-configtool-0.4.10/gtk3/configdesc.c:42:13: note: Assuming condition is true fcitx-configtool-0.4.10/gtk3/configdesc.c:40:9: note: Assuming condition is true fcitx-configtool-0.4.10/gtk3/configdesc.c:54:12: note: Null pointer dereference Explanation: At line 43 `desc = malloc(...)` is never checked for NULL. Line 44 already dereferences it (`memset(desc, ...)`, then `desc->filename`). If the allocation fails, `desc` is still NULL when control leaves the `if (tmpfp)` block, so `return desc->cfdesc;` at line 54 does dereference a null pointer on that path. The new nullPointerOutOfMemory warning therefore describes a real missing allocation check. The PR now carries the possible null value past the HASH_ADD_KEYPTR macro and its inner branches, which main apparently lost. It is somewhat redundant, because the earlier dereferences at lines 44–45 are the first fault, but it is not a false positive. ---- 57 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/g729postfilter.c:303:9: style: Condition '!gain_num' is always true [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/g729postfilter.c:165:16: note: Assignment 'gain_num=0', assigned value is 0 ffmpeg-9.1/libavcodec/g729postfilter.c:303:9: note: Condition '!gain_num' is always true Explanation: `gain_num` starts at 0 (line 165), but inside the nested `if (ener)` / `if (corr_int_num)` / loop blocks it can be reassigned to a non-zero value (for example `gain_num = gain_num_short;` at line 280). It is only conditionally reset to 0 at line 297. So `!gain_num` at line 303 is not always true, and main's warning was a false positive. It came from main wrongly letting the known value 0 survive past blocks where only some paths keep it. The PR handles paths that part inside a block more carefully, which removes this false positive. ---- 58 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:118:26: style: Condition 'i>=1' is always true [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:116:19: note: Assuming that condition 'i==0' is not redundant ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:118:26: note: Condition 'i>=1' is always true Explanation: Line 118 sits in a loop where `i` runs from 0 to 2. In the else of `if (i == 0)`, `i` can only be 1 or 2, so `i >= 1` really is always true. The removed warning was a true positive, even if a stylistic one. The PR's rework of path splitting and value lowering made Cppcheck stop deriving this, so this is a new false negative rather than a removed false positive. ---- 59 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:150:22: style: Condition 'i==1' is always true [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:145:15: note: Assuming that condition 'i==0' is not redundant ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:150:22: note: Condition 'i==1' is always true Explanation: The loop runs `for (i = 0; i < 2; i++)`, so `i` is only ever 0 or 1. In the else branch of `if (i == 0)`, `i` must be 1, so `else if (i == 1)` at line 150 is indeed always true. The warning was a correct (if stylistic) true positive. The PR dropped it, which is a new false negative. This is not a new false positive or a bailout, so it is an acceptable regression. ---- 60 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:166:26: style: Condition 'i==1' is always true [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:164:19: note: Assuming that condition 'i==0' is not redundant ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:145:15: note: Assuming condition is true ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:166:26: note: Condition 'i==1' is always true Explanation: The loop runs `for (i = 0; i < 2; i++)`, so `i` is only ever 0 or 1. In the else branch of `if (i == 0)`, `i` must be 1, so `else if (i == 1)` at line 166 really is always true. Cppcheck main reported this correctly. The note path is a bit odd: it says 'Assuming condition is true' at line 145. The conclusion is still right. The PR's changes to how the forward analysis joins paths after the earlier `if (i == 0) ... else if (i == 1)` at lines 145/150 make the value of `i` less precise here, so this true positive is lost. The sibling warnings at lines 150, 197 and 214 disappear the same way. Losing a correct style warning is a new false negative, not a new false positive. ---- 61 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:197:22: style: Condition 'i==1' is always true [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:195:15: note: Assuming that condition 'i==0' is not redundant ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:197:22: note: Condition 'i==1' is always true Explanation: The loop runs `for (i = 0; i < 2; i++)`, so `i` is only ever 0 or 1. Line 197 is the else branch of `if (i == 0)`, so there `i` must be 1 and `else if (i == 1)` is always true. The removed warning was therefore technically correct, even though the code is written that way on purpose for symmetry. The PR changes how paths through branches are joined, and losing this warning is a new false negative rather than a removed false positive. ---- 62 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:214:26: style: Condition 'i==1' is always true [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:212:19: note: Assuming that condition 'i==0' is not redundant ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:195:15: note: Assuming condition is true ffmpeg-9.1/libavcodec/mediacodec_sw_buffer.c:214:26: note: Condition 'i==1' is always true Explanation: The loop runs `for (i = 0; i < 2; i++)`, so `i` is only ever 0 or 1. In the else branch of `if (i == 0)` at line 212, `i == 1` is therefore always true. The removed warning was a true positive, even though the code is written that way on purpose for readability and the note path (via line 195) is somewhat odd. The PR changes how values are joined across branches, and losing this correct report is a new false negative rather than the removal of a false positive. ---- 63 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/rka.c:509:19: style: Condition 'idx==8' is always false [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/rka.c:497:15: note: Assignment 'idx=0', assigned value is 0 ffmpeg-9.1/libavcodec/rka.c:502:19: note: Assuming condition is false ffmpeg-9.1/libavcodec/rka.c:509:19: note: Condition 'idx==8' is always false Explanation: The do-while loop increments idx on every iteration, through 'dst->coeffs[idx++] = 0' or 'idx++', so idx reaches 8 and 20 on later iterations. The condition 'idx == 8' is therefore not always false; it only is on the first iteration. The removed warning was a false positive, and the PR's more careful path handling removed it. ---- 64 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_9.1.orig.tar.xz Result: main ffmpeg-9.1/libavcodec/rka.c:509:33: style: Condition 'idx==20' is always false [knownConditionTrueFalse] ffmpeg-9.1/libavcodec/rka.c:497:15: note: Assignment 'idx=0', assigned value is 0 ffmpeg-9.1/libavcodec/rka.c:502:19: note: Assuming condition is false ffmpeg-9.1/libavcodec/rka.c:509:33: note: Condition 'idx==20' is always false Explanation: The do-while loop increments idx on every iteration (idx++ in both blocks of the if/else) and repeats while idx < dst->size. So idx takes the values 8 and 20 on later iterations, and the condition 'idx==20' is not always false. Main reported it based on the first iteration's idx=0, which is a false positive. The PR removed it, along with the matching idx==8 warning. Removing a false positive is an improvement. ---- 65 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/fossil/fossil_2.28.orig.tar.xz Result: main fossil-src-2.28/extsrc/sqlite3.c:70028:9: style: Condition '!useWal' is always false [knownConditionTrueFalse] Explanation: In sqlite's walTryBeginRead, 'useWal' is a function parameter. The preceding 'if( !useWal ){ ... }' block returns only when rc!=SQLITE_OK or bShmUnreliable is set. Otherwise the useWal==0 path falls through to line 70028, so '!useWal' can be true there. The old 'always false' warning was a false positive: main treated the block as escaping on every path. This PR tracks partially terminating paths, and removing the warning is correct. ---- 66 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/fossil/fossil_2.28.orig.tar.xz Result: your fossil-src-2.28/compat/zlib/contrib/minizip/mztools.c:191:25: style: Condition 'comsize>0' is always false [knownConditionTrueFalse] fossil-src-2.28/compat/zlib/contrib/minizip/mztools.c:144:27: note: Assignment 'comment=""', assigned value is "" fossil-src-2.28/compat/zlib/contrib/minizip/mztools.c:145:25: note: Assignment 'comsize=(int)strlen(comment)', assigned value is 0 fossil-src-2.28/compat/zlib/contrib/minizip/mztools.c:164:46: note: Assuming condition is true fossil-src-2.28/compat/zlib/contrib/minizip/mztools.c:168:24: note: Assuming condition is true fossil-src-2.28/compat/zlib/contrib/minizip/mztools.c:169:56: note: Assuming condition is true fossil-src-2.28/compat/zlib/contrib/minizip/mztools.c:191:25: note: Condition 'comsize>0' is always false Explanation: Line 144 sets `comment = ""` and line 145 sets `comsize = (int)strlen(comment)`, so `comsize` is 0. Nothing in the block changes it before line 191, so `comsize > 0` really is always false. The code is a placeholder for an unused comment, but the warning is correct. Main probably lost the value along the paths through the earlier `fwrite`/`break` branches. The PR's better per-path tracking keeps it, which adds a true positive. ---- 67 / 291 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/f/fossil/fossil_2.28.orig.tar.xz Result: your fossil-src-2.28/tools/makeheaders.c:3360:11: style: Condition 'pFile' is always true [knownConditionTrueFalse] Explanation: `pFile` comes from `CreateInFile(argv[i], &nErr)`. As far as I recall the makeheaders source, that function allocates through `SafeMalloc`, which exits on failure, and always returns the pointer. If so, the null check is redundant and the warning would be technically true, though it only flags defensive code. However, the function body is not shown, the warning has no notes explaining how the non-null value was derived, and the PR only changes intra-procedural forward path splitting. It is not visible how the PR newly concludes that a function's return value is always non-null at this point. It could be a real gain or a side effect of the new path handling, so the change cannot be judged from what is given. ---- 68 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/freedink/freedink_109.6.orig.tar.gz Result: main freedink-109.6/src/brain.cpp:608:20: style: Condition 'cleary' is always false [knownConditionTrueFalse] freedink-109.6/src/brain.cpp:600:20: note: Assignment 'cleary=0', assigned value is 0 freedink-109.6/src/brain.cpp:606:10: note: Assuming condition is true freedink-109.6/src/brain.cpp:608:20: note: Condition 'cleary' is always false Explanation: Both versions report the same true positive. `cleary` is set to 0 at line 600 and is only ever assigned 0 again inside the `if` at line 613, which itself requires `cleary` to be true. Line 606 assigns `clearx`, not `cleary`, which looks like a copy-paste bug. So `cleary` is always false at line 608, whatever the condition at line 606 is. The old note 'Assuming condition is true' at line 606 suggested the result depended on that condition, which is misleading. The new error path shows only the assignment and the condition, which is more accurate. ---- 69 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/freedink/freedink_109.6.orig.tar.gz Result: your freedink-109.6/src/brain.cpp:608:20: style: Condition 'cleary' is always false [knownConditionTrueFalse] freedink-109.6/src/brain.cpp:600:20: note: Assignment 'cleary=0', assigned value is 0 freedink-109.6/src/brain.cpp:608:20: note: Condition 'cleary' is always false Explanation: `cleary` is set to 0 at line 600, and inside the loop it is only ever assigned 0 again (line 613). So `(clearx) && (cleary)` at line 608 has `cleary` always false, and the warning is a true positive in both versions. The only change is in the error path. Main included an 'Assuming condition is true' note at line 606 (`if (my >= spr[u].my) clearx = 1;`). That condition has nothing to do with `cleary`'s value, so the note is misleading. The PR drops it, leaving a direct assignment-to-condition path, which is more accurate. ---- 70 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gegl/gegl_0.4.72.orig.tar.xz Result: your gegl-0.4.72/gegl/gegl-serialize.c:284:20: warning: Either the condition 'error' is redundant or there is possible null pointer dereference: error. [nullPointerRedundantCheck] gegl-0.4.72/gegl/gegl-serialize.c:817:24: note: Assuming that condition 'error' is not redundant gegl-0.4.72/gegl/gegl-serialize.c:798:38: note: Assuming condition is false gegl-0.4.72/gegl/gegl-serialize.c:406:22: note: Assuming condition is false gegl-0.4.72/gegl/gegl-serialize.c:397:35: note: Assuming condition is false gegl-0.4.72/gegl/gegl-serialize.c:374:16: note: Assuming condition is false gegl-0.4.72/gegl/gegl-serialize.c:286:11: note: Assuming condition is false gegl-0.4.72/gegl/gegl-serialize.c:284:20: note: Null pointer dereference Explanation: `error` is never reassigned in this function. It is checked for NULL at line 271 (`if (error && *error)`), at line 320 and, per the notes, at line 817. Yet line 284 (`while (*arg && !*error)`) dereferences it unconditionally before any of those checks guard it. If `error` can be NULL, as the later checks suggest, line 284 crashes; otherwise those checks are redundant. That is exactly what nullPointerRedundantCheck reports, so the new warning is a true positive. The PR's better path tracking lets Cppcheck carry the possible NULL value back from line 817 to line 284. ---- 71 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gegl/gegl_0.4.72.orig.tar.xz Result: your gegl-0.4.72/operations/common/snn-mean.c:222:30: style: Condition 'v==0' is always true [knownConditionTrueFalse] gegl-0.4.72/operations/common/snn-mean.c:171:27: note: Assuming that condition 'v<=0' is not redundant gegl-0.4.72/operations/common/snn-mean.c:222:30: note: Condition 'v==0' is always true Explanation: Line 171 is the outer loop header `for (v=-radius; v<=0; v++)`, so v takes every value from -radius to 0. `v==0` at line 222 is only evaluated when u==0. The inner loop reaches u==0 for every v, whether u runs up to 0 or past it. So u==0 does not imply v==0, and `v==0` is false on every iteration before the last value of v. The new 'always true' warning is a false positive, probably from the changed path/terminate handling in the forward analysis. ---- 72 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gifticlib/gifticlib_1.0.9.orig.tar.gz Result: main gifticlib-1.0.9/gifti_io.c:2549:23: style: Condition 'g1->numDAnumDA' is always false [knownConditionTrueFalse] gifticlib-1.0.9/gifti_io.c:2541:19: note: Assuming that condition 'g1->numDA!=g2->numDA' is not redundant gifticlib-1.0.9/gifti_io.c:2549:23: note: Condition 'g1->numDAnumDA' is always false Explanation: When g1->numDA != g2->numDA and lverb >= 2, the if block does not return, so execution reaches line 2549 with the counts still different. On that path 'g1->numDA < g2->numDA' can be true. Main wrongly treated the then block as always escaping, which made the condition look always false. The code comment even says 'even if they differ, we may want to continue'. The PR tracks paths that only partly terminate, so this false positive is removed. The same pattern explains the other removed warnings in this package. ---- 73 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gifticlib/gifticlib_1.0.9.orig.tar.gz Result: main gifticlib-1.0.9/gifti_io.c:2739:23: style: Condition 'd1->num_dimnum_dim' is always false [knownConditionTrueFalse] gifticlib-1.0.9/gifti_io.c:2729:21: note: Assuming that condition 'd1->num_dim!=d2->num_dim' is not redundant gifticlib-1.0.9/gifti_io.c:2739:23: note: Condition 'd1->num_dimnum_dim' is always false Explanation: The block under 'if (d1->num_dim != d2->num_dim)' returns only when 'lverb < 3'. When 'lverb >= 3' it falls through, so after the if the two num_dim values can still differ. That means 'd1->num_dim < d2->num_dim' at line 2739 can be true, and main's 'always false' warning was a false positive. The PR tracks the path that does not return in a partially escaping block, so removing the warning is correct. ---- 74 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gifticlib/gifticlib_1.0.9.orig.tar.gz Result: main gifticlib-1.0.9/gifti_io.c:2808:21: style: Condition 'd1->numCSnumCS' is always false [knownConditionTrueFalse] gifticlib-1.0.9/gifti_io.c:2801:19: note: Assuming that condition 'd1->numCS!=d2->numCS' is not redundant gifticlib-1.0.9/gifti_io.c:2808:21: note: Condition 'd1->numCSnumCS' is always false Explanation: The block at 2801 runs when `d1->numCS != d2->numCS`. It returns only if `lverb < 3`. When `lverb >= 3` the path falls through with the two counts still different, so `d1->numCS < d2->numCS` at line 2808 can be true. Main wrongly treated the then-block as always escaping and called the condition always false, which was a false positive. The PR tracks the partial escape correctly and removes the warning. ---- 75 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gifticlib/gifticlib_1.0.9.orig.tar.gz Result: main gifticlib-1.0.9/gifti_io.c:2953:21: style: Condition 'd1->numCSnumCS' is always false [knownConditionTrueFalse] gifticlib-1.0.9/gifti_io.c:2946:19: note: Assuming that condition 'd1->numCS!=d2->numCS' is not redundant gifticlib-1.0.9/gifti_io.c:2953:21: note: Condition 'd1->numCSnumCS' is always false Explanation: The block at line 2946 returns only when `lverb < 3`. When `lverb >= 3` the path falls through with `d1->numCS != d2->numCS`, so `d1->numCS < d2->numCS` at line 2953 can be true. `lverb` comes from the `verb` parameter and the global `G.verb`, so it is unknown. Main wrongly treated the then block as always escaping and reported the condition as always false. That was a false positive, and the PR's partial-termination handling removes it. ---- 76 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gifticlib/gifticlib_1.0.9.orig.tar.gz Result: main gifticlib-1.0.9/gifti_io.c:3045:23: style: Condition 'd1->num_dimnum_dim' is always false [knownConditionTrueFalse] gifticlib-1.0.9/gifti_io.c:3037:21: note: Assuming that condition 'd1->num_dim!=d2->num_dim' is not redundant gifticlib-1.0.9/gifti_io.c:3045:23: note: Condition 'd1->num_dimnum_dim' is always false Explanation: The block at line 3037 does not always leave the function. It returns only when `lverb < 3`. With `lverb >= 3` and differing `num_dim`, execution reaches line 3045, where `d1->num_dim < d2->num_dim` can be true. So the main warning 'always false' was a false positive. The PR stops treating a partially escaping block as fully escaping, so removing this warning is an improvement. ---- 77 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gifticlib/gifticlib_1.0.9.orig.tar.gz Result: main gifticlib-1.0.9/gifti_io.c:3116:22: style: Condition 'p1->lengthlength' is always false [knownConditionTrueFalse] gifticlib-1.0.9/gifti_io.c:3108:20: note: Assuming that condition 'p1->length!=p2->length' is not redundant gifticlib-1.0.9/gifti_io.c:3116:22: note: Condition 'p1->lengthlength' is always false Explanation: When the lengths differ, the block at 3108 only returns if lverb < 3. With lverb >= 3 it falls through to line 3116 while the lengths still differ, so 'p1->lengthlength' can be true. Main wrongly treated the block as always escaping and reported the condition as always false. The PR tracks the partially returning block correctly and removes this false positive. ---- 78 / 291 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/ginkgocadx/ginkgocadx_3.8.8.orig.tar.gz Result: main ginkgocadx-3.8.8/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp:665:13: style: Condition 'negotiateAnnotationBox' is always false [knownConditionTrueFalse] ginkgocadx-3.8.8/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp:634:39: note: Assignment 'negotiateAnnotationBox=false', assigned value is 0 ginkgocadx-3.8.8/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp:665:13: note: Condition 'negotiateAnnotationBox' is always false Explanation: `negotiateAnnotationBox` is a local bool initialized to false on line 634 and never assigned again. Nothing between line 634 and line 665 can change it; the code in between only touches `transferSyntaxes` and `cond`. So the condition at line 665 really is always false, and main's warning was a true positive; the coverity comments show the dead code is deliberate. The PR's new path-splitting and Partial-terminate handling now drops this known value, so the true positive disappears. That is a new false negative, not a removed false positive. ---- 79 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/ginkgocadx/ginkgocadx_3.8.8.orig.tar.gz Result: your ginkgocadx-3.8.8/cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp:759:27: style: Condition 'element!=NULL' is always true [knownConditionTrueFalse] Explanation: Every path through the 'if (element==NULL)' block ends the loop iteration for good: three paths return 0, and the last one assigns element and breaks. Code after that block is only reached when element is not NULL, so 'if (element!=NULL)' at line 759 is indeed always true. The PR tracks escapes better when the escaping block also modifies the variable, so this new warning is a true positive (a redundant check). ---- 80 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/ginkgocadx/ginkgocadx_3.8.8.orig.tar.gz Result: your ginkgocadx-3.8.8/cadxcore/main/controllers/dicommanager.cpp:1216:27: style: Condition 'element!=NULL' is always true [knownConditionTrueFalse] Explanation: Every path through the `if(element==NULL)` block at line 1185 leaves the loop iteration: the error checks `return 0`, and the success path ends in `break`. Code at line 1216 is therefore only reached when element is non-NULL, so `element!=NULL` really is always true. The PR's better tracking of paths that all escape (return/break) now reports this redundant check, which is a new true positive. ---- 81 / 291 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnutls28/gnutls28_3.8.14.orig.tar.xz Result: main gnutls-3.8.14/src/certtool-common.c:1604:10: style: Condition 'how!=0' is always true [knownConditionTrueFalse] Explanation: At line 1604, `how != 0` is only always true in the configuration without ENABLE_SRP. There the `how == 0` else-block is just `fprintf(...); app_exit(1);`. With SRP enabled, the `how == 0` block picks p/g by bit size, calls gnutls_dh_params_import_raw, and calls app_exit only when `ret < 0`. On the normal path it falls through to line 1604, so the condition is not always true. In that configuration the warning is a false positive caused by treating a partially escaping block as escaping on every path, which is exactly what this PR fixes with the new Partial terminate. The PR does not touch the trivially escaping no-SRP block, so the removed warning most likely came from the SRP configuration (the one real builds use). If it came from the no-SRP configuration instead, it would be a config-dependent true positive lost, hence low confidence. ---- 82 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gperf/gperf_3.3.orig.tar.gz Result: main gperf-3.3/src/input.cc:727:27: style: Condition 'struct_decl==NULL' is always true [knownConditionTrueFalse] gperf-3.3/src/input.cc:656:15: note: Assuming that condition 'struct_decl' is not redundant gperf-3.3/src/input.cc:727:27: note: Condition 'struct_decl==NULL' is always true Explanation: Line 656 is presumably `if (struct_decl)`, and the block that follows it ends at line 726. Inside that block struct_decl stays non-null. It is either kept or replaced by a freshly allocated `new_struct_decl`. When control reaches line 727 through that block, `struct_decl == NULL` is therefore false. Only the path where the block is skipped (struct_decl null) makes it true. So 'always true' at 727 was a false positive, and the PR's more precise path tracking removes it. ---- 83 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gpsshogi/gpsshogi_0.7.0.orig.tar.gz Result: your gpsshogi-0.7.0.orig/sample/gpsshell/gpsshell.cc:297:21: warning: Either the condition 'tokens.empty()' is redundant or expression 'tokens.front()' causes access out of bounds. [containerOutOfBounds] gpsshogi-0.7.0.orig/sample/gpsshell/gpsshell.cc:284:21: note: Assuming that condition 'tokens.empty()' is not redundant gpsshogi-0.7.0.orig/sample/gpsshell/gpsshell.cc:297:21: note: Access out of bounds Explanation: When `tokens.empty()` is true at line 284, `tokens` is only refilled if `history` is non-empty, through `SplitTokens(last_command, tokens)`. If the history is empty, for example when the first input line is blank, `tokens` stays empty. Line 297 then calls `tokens.front()` on an empty vector, which is undefined behaviour. This is the pattern the PR targets: the value is changed on one inner path and kept on another. Main treated the possible modification as covering every path and dropped the empty state. The new warning is a true positive. ---- 84 / 291 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/groff/groff_1.25.0.orig.tar.gz Result: main groff-1.25.0/src/devices/grohtml/post-html.cpp:5854:27: style: Condition '0==l' is always false [knownConditionTrueFalse] Explanation: Lines 5833-5836 return early when `l` is null, and there is also an `assert(l != 0)`. So at line 5854 `l` is always non-null and `0==l` is indeed always false. The removed warning was a true positive about a redundant defensive check. Losing it is a new false negative, likely caused by the PR's more conservative path joining (Partial terminate / dropping impossible values). ---- 85 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gromacs/gromacs_2026.4.orig.tar.gz Result: your gromacs-2026.4/src/external/clFFT/src/library/plan.cpp:174:11: style: Condition 'status' is always true [knownConditionTrueFalse] gromacs-2026.4/src/external/clFFT/src/library/plan.cpp:86:6: note: Assuming that condition '!status' is not redundant gromacs-2026.4/src/external/clFFT/src/library/plan.cpp:90:15: note: Assuming condition is true gromacs-2026.4/src/external/clFFT/src/library/plan.cpp:174:11: note: Condition 'status' is always true Explanation: The new warning says 'status' is always true at line 174, and this looks correct. The note at line 86 shows the value comes from the check 'if (!status)', and a known value after such a check means that branch leaves the function. Lines 90–172 only compute pow2/pow3/pow5 and divide_factor and never assign 'status'. So at line 174 'status' must still be true, and 'status && ...' is a redundant check. The new path handling lets the true value survive through the many nested if/else blocks, which main lost. This is a new true positive, though lines 80–90 are not shown. ---- 86 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gromacs/gromacs_2026.4.orig.tar.gz Result: your gromacs-2026.4/src/gromacs/gmxana/gmx_covar.cpp:252:13: warning:inconclusive: Possible null pointer dereference: w_rls [nullPointer] gromacs-2026.4/src/gromacs/gmxana/gmx_covar.cpp:179:36: note: Assignment 'w_rls=nullptr', assigned value is 0 gromacs-2026.4/src/gromacs/gmxana/gmx_covar.cpp:205:9: note: Assuming condition is false gromacs-2026.4/src/gromacs/gmxana/gmx_covar.cpp:227:9: note: Assuming condition is true gromacs-2026.4/src/gromacs/gmxana/gmx_covar.cpp:233:18: note: Assuming condition is false gromacs-2026.4/src/gromacs/gmxana/gmx_covar.cpp:252:13: note: Null pointer dereference Explanation: `w_rls` starts as nullptr at line 179. Inside the `if (bFit)` block it is allocated by `snew(w_rls, atoms->nr)` at line 249, right before the loop that writes `w_rls[ifit[i]]` at line 252. In GROMACS C++ code, `snew` passes the pointer by reference to an allocating function, so the pointer is assigned before it is dereferenced. The null value from line 179 can never reach line 252. The new inconclusive nullPointer warning is a false positive: the PR's path changes no longer treat the by-reference call as modifying `w_rls`. ---- 87 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gromacs/gromacs_2026.4.orig.tar.gz Result: your gromacs-2026.4/src/gromacs/gmxana/gmx_rmsf.cpp:143:56: warning: Possible null pointer dereference: U [nullPointer] gromacs-2026.4/src/gromacs/gmxana/gmx_rmsf.cpp:547:36: note: Calling function 'average_residues', 2nd argument 'nullptr' value is 0 gromacs-2026.4/src/gromacs/gmxana/gmx_rmsf.cpp:143:56: note: Null pointer dereference Explanation: `average_residues` is called with `U == nullptr` at line 547. In that call `f` is the allocated `rmsf` array, so it is non-null. Inside the function, `U[i][uind]` is only evaluated when `f == nullptr`, and the `if (!f) assert(U);` block states that `U` is non-null whenever `f` is null. So `U` is never dereferenced as a null pointer and the new nullPointer warning is a false positive. The PR's new partial-path handling around the `if (!f) { assert(U); }` block apparently lost the relation between `f` and `U` that main kept. ---- 88 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/h/halibut/halibut_1.3.orig.tar.gz Result: main halibut-1.3/in_sfnt.c:862:20: style: Variable 'endCode' can be declared as pointer to const [constVariablePointer] Explanation: In the code shown, 'endCode' is set to 'data' and only read afterwards ('k <= endCode[j]'). It is never written through, so it could be 'const unsigned *' and the removed constVariablePointer warning looks like a true positive. The PR only changes forward value-flow path handling, which should not affect this check, so the loss looks like a side effect. That makes it a new false negative. Confidence is medium because the rest of the function is not shown. ---- 89 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/h/healpy/healpy_1.19.0.orig.tar.gz Result: main healpy-1.19.0/cextern/cfitsio/utilities/fpackutil.c:961:9: style: Condition '!stat' is always true [knownConditionTrueFalse] healpy-1.19.0/cextern/cfitsio/utilities/fpackutil.c:952:6: note: Assuming that condition 'stat' is not redundant healpy-1.19.0/cextern/cfitsio/utilities/fpackutil.c:961:9: note: Condition '!stat' is always true Explanation: `stat` is 0 when the loop is first entered, because both `if (stat)` blocks call `fp_abort_output`, which exits. But `while (!stat)` is a loop condition that is checked again after every pass. The body passes `&stat` to many functions, and `fits_movrel_hdu` sets it to END_OF_FILE at the last HDU, which ends the loop. So 'Condition !stat is always true' is wrong, and removing this false positive is an improvement. ---- 90 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iqtree/iqtree_2.4.0+dfsg.orig.tar.xz Result: main iqtree-2.4.0/main/phyloanalysis.cpp:2962:27: style: Condition '!finishedInitTree' is always true [knownConditionTrueFalse] iqtree-2.4.0/main/phyloanalysis.cpp:2862:31: note: Assignment 'finishedInitTree=false', assigned value is 0 iqtree-2.4.0/main/phyloanalysis.cpp:2864:26: note: Assuming condition is true iqtree-2.4.0/main/phyloanalysis.cpp:2874:9: note: Assuming condition is false iqtree-2.4.0/main/phyloanalysis.cpp:2961:9: note: Assuming condition is true iqtree-2.4.0/main/phyloanalysis.cpp:2962:27: note: Condition '!finishedInitTree' is always true Explanation: `finishedInitTree` starts as false (line 2862). The `if (!finishedInitTree)` check at line 2927, inside the block that starts around line 2874, shows the code expects the flag to change on some paths, probably when restoring from a checkpoint. Main reached 'always true' only by assuming the line 2874 condition is false, so it treated the value as known false at line 2962 even though another path can set it. The PR targets exactly this: blocks where some paths change the value and others stop. Those blocks now get Terminate::Partial, and the value is no longer marked known after the condition. The removed warning is very likely a false positive. Lines 2862–2874 are not shown, so this cannot be fully confirmed. ---- 91 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iqtree/iqtree_2.4.0+dfsg.orig.tar.xz Result: main iqtree-2.4.0/tree/phylosupertree.cpp:905:16: warning: Uninitialized variables: myMove.node1Nei_it, myMove.node1Nei_it, myMove.node2Nei_it, myMove.node2Nei_it, myMove.swap_id, myMove.swap_id, myMove.ptnlh, myMove.ptnlh [uninitvar] iqtree-2.4.0/tree/phylosupertree.cpp:900:20: note: Assuming condition is true iqtree-2.4.0/tree/phylosupertree.cpp:902:13: note: Assuming condition is true iqtree-2.4.0/tree/phylosupertree.cpp:905:16: note: Uninitialized variables: myMove.node1Nei_it, myMove.node1Nei_it, myMove.node2Nei_it, myMove.node2Nei_it, myMove.swap_id, myMove.swap_id, myMove.ptnlh, myMove.ptnlh Explanation: This warning was not dropped. It was replaced by the 'your' warning at the same line, 905:16: 'myMove' is returned while node1Nei_it, node2Nei_it, swap_id and ptnlh are still unset. The finding is the same. The old message listed every variable twice and its path included an irrelevant 'Assuming condition is true' step at line 902 (the nniMoves check, which does not affect myMove). The new message names each variable once and shows only the relevant condition at line 900, so it is more accurate. ---- 92 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iqtree/iqtree_2.4.0+dfsg.orig.tar.xz Result: main iqtree-2.4.0/utils/eigendecomposition.cpp:1215:3: warning: If memory allocation fails, then there is a possible null pointer dereference: wk [nullPointerOutOfMemory] iqtree-2.4.0/utils/eigendecomposition.cpp:1203:24: note: Assuming allocation function fails iqtree-2.4.0/utils/eigendecomposition.cpp:1203:7: note: Assignment 'wk=(double*)std::calloc((unsigned long)size,sizeof(double))', assigned value is 0 iqtree-2.4.0/utils/eigendecomposition.cpp:1215:3: note: Null pointer dereference Explanation: The PR did not remove this warning; it re-reported it with one extra note, 'Assuming condition is false' at line 1211 (the `maxb == 0.0` check whose block holds an ASSERT). The warning is still correct: the result of calloc() at line 1203 is never checked before `wk[i]` is written at line 1215. The extra note is accurate, because the dereference is reached on the path where the singular-matrix check is false, but it does not change the warning in any way that matters to users. ---- 93 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iqtree/iqtree_2.4.0+dfsg.orig.tar.xz Result: your iqtree-2.4.0/booster/tree.c:977:29: warning: If memory allocation fails, then there is a possible null pointer dereference: mytable [nullPointerOutOfMemory] iqtree-2.4.0/booster/tree.c:967:23: note: Assuming allocation function fails iqtree-2.4.0/booster/tree.c:967:23: note: Assignment 'mytable=calloc(t->nb_nodes,sizeof(int))', assigned value is 0 iqtree-2.4.0/booster/tree.c:972:20: note: Assuming condition is false iqtree-2.4.0/booster/tree.c:977:29: note: Null pointer dereference Explanation: `reroot_acceptable()` calls `calloc()` and never checks the result. It then indexes `mytable` in the loop and again at line 977 in the else branch of `if (nb_trifurcated == 0)`. Only the then branch returns. The else branch (line 977) reads through the unchecked pointer, so the null value really does reach the dereference. The PR now carries the null value into the else block instead of dropping it, which matches the `eigendecomposition.cpp` warning that main already reports. To reach line 977 the loop must already have written through `mytable` at line 970, so this partly duplicates the bug there. It is still a valid unchecked-allocation finding, not a false positive. ---- 94 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iqtree/iqtree_2.4.0+dfsg.orig.tar.xz Result: your iqtree-2.4.0/tree/phylosupertree.cpp:905:16: warning: Uninitialized variables: myMove.node1Nei_it, myMove.node2Nei_it, myMove.swap_id, myMove.ptnlh [uninitvar] iqtree-2.4.0/tree/phylosupertree.cpp:900:20: note: Assuming condition is true iqtree-2.4.0/tree/phylosupertree.cpp:905:16: note: Uninitialized variables: myMove.node1Nei_it, myMove.node2Nei_it, myMove.swap_id, myMove.ptnlh Explanation: Both versions warn that `myMove` is returned at line 905 with some members never set. Only `node1`, `node2` and `newloglh` are assigned before the early return, so the warning itself is plausible in both. The old message listed each member twice and had an extra note assuming the `if (nniMoves)` condition at line 902, which has nothing to do with `myMove`. The new message lists each uninitialized member once and its path keeps only the relevant condition at line 900. The warning is the same, but the message is cleaner and more accurate. ---- 95 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iqtree/iqtree_2.4.0+dfsg.orig.tar.xz Result: your iqtree-2.4.0/utils/eigendecomposition.cpp:1215:3: warning: If memory allocation fails, then there is a possible null pointer dereference: wk [nullPointerOutOfMemory] iqtree-2.4.0/utils/eigendecomposition.cpp:1203:24: note: Assuming allocation function fails iqtree-2.4.0/utils/eigendecomposition.cpp:1203:7: note: Assignment 'wk=(double*)std::calloc((unsigned long)size,sizeof(double))', assigned value is 0 iqtree-2.4.0/utils/eigendecomposition.cpp:1211:12: note: Assuming condition is false iqtree-2.4.0/utils/eigendecomposition.cpp:1215:3: note: Null pointer dereference Explanation: This is the same nullPointerOutOfMemory warning at the same location. `wk` comes from `calloc` and is dereferenced at `wk[i]` with no null check, so the warning is a true positive both before and after the change. The only difference is one extra note in the error path, "Assuming condition is false" for `if (maxb == 0.0)`. That block holds only an `ASSERT`, so the note is plausible but does not change what is reported. It makes no practical difference to users. ---- 96 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/its-playback-time/its-playback-time_0.2017-08-30.3c40fd3.orig.tar.gz Result: your its-playback-time-0.2017-08-30.3c40fd3/terminal.c:5528:10: error: Null pointer dereference: ldata [nullPointer] its-playback-time-0.2017-08-30.3c40fd3/terminal.c:5476:20: note: Assignment 'ldata=(lineptr)(term,top.y,5476,0)', assigned value is 0 its-playback-time-0.2017-08-30.3c40fd3/terminal.c:5493:6: note: Assuming condition is true its-playback-time-0.2017-08-30.3c40fd3/terminal.c:5528:10: note: Null pointer dereference Explanation: In PuTTY's clipme(), `ldata` comes from lineptr(). lineptr() never returns NULL: it calls fatalbox() and asserts `line != NULL` before returning the line. So the claim that the assigned value is 0 is wrong. The new error is also internally inconsistent. Its own path dereferences `ldata` at line 5493 (`ldata->lattr`) without any warning, then 'assumes' that condition true, and only reports the dereference at 5528. This points to the PR's new path splitting and joining carrying a bogus null value into the loop, not to a real bug. It is a new false positive. ---- 97 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/klibc/klibc_2.0.14.orig.tar.xz Result: main klibc-2.0.14/usr/klibc/stdio/fread.c:69:7: style: Condition 'nb' is always true [knownConditionTrueFalse] klibc-2.0.14/usr/klibc/stdio/fread.c:26:20: note: Assuming that condition 'f->ibytes==0' is not redundant klibc-2.0.14/usr/klibc/stdio/fread.c:68:21: note: Assignment 'nb=(countibytes==0 and the read takes the bypass path (count >= bufsiz), f->ibytes stays 0. After a partial read, count is still nonzero, so the code falls through to line 67 with nb = f->ibytes = 0, and 'if (nb)' is false. Only the non-bypass path sets f->ibytes = rv > 0. This is the case the PR targets: one path through the block changes the value and another keeps it. Main wrongly took the changed value as the result of the whole block. ---- 98 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/knot-resolver/knot-resolver_6.5.0.orig.tar.xz Result: your knot-resolver-6.5.0/lib/utils.c:717:29: style: Condition 'bits>=0' is always true [knownConditionTrueFalse] knot-resolver-6.5.0/lib/utils.c:709:11: note: Assuming that condition 'bits<=0' is not redundant knot-resolver-6.5.0/lib/utils.c:717:29: note: Condition 'bits>=0' is always true Explanation: Line 709 returns whenever 'bits <= 0'. The 'else if' branches after it also all return. So every path that reaches line 717 has 'bits > 0', and 'bits >= 0' there is always true. The new warning is a correct true positive: the check inside kr_require is redundant. The PR now carries the 'bits > 0' knowledge past the if/else-if chain where every branch returns, which main missed. ---- 99 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/knot-resolver/knot-resolver_6.5.0.orig.tar.xz Result: your knot-resolver-6.5.0/lib/utils.c:717:45: style: Condition 'bits==0' is always false [knownConditionTrueFalse] knot-resolver-6.5.0/lib/utils.c:709:11: note: Assuming that condition 'bits<=0' is not redundant knot-resolver-6.5.0/lib/utils.c:717:45: note: Condition 'bits==0' is always false Explanation: Line 709 returns early when 'bits <= 0', and the branches at 711 and 713 return too. Every path that reaches line 717 therefore has bits > 0, so 'bits==0' is indeed always false. The PR lets the value analysis see that all of these branches escape, which turns this into a newly found true positive. It sits inside a defensive kr_require assertion, but the condition really is redundant there. ---- 100 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/l/labplot/labplot_2.12.1.orig.tar.xz Result: main labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:212:6: style: Condition 'hasDateTime' is always false [knownConditionTrueFalse] labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:167:21: note: Assignment 'hasDateTime=false', assigned value is 0 labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:212:6: note: Condition 'hasDateTime' is always false Explanation: This main line is not really gone: the same warning at 212:6 ('hasDateTime' is always false) is still reported by the PR, only with extra path notes ('Assuming condition is true' at 169, 'Assuming condition is false' at 200). The warning itself looks like a false positive in both versions. hasDateTime starts as false at line 167, but line 180 sets it to true inside the then block of the if at 169 when the column mode is DateTime. Assuming 'hasNumeric || hasInteger' is false at line 200 does not make hasDateTime false either. So the PR neither removes nor adds a false positive; it only changes the notes of a warning that was already wrong. ---- 101 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/l/labplot/labplot_2.12.1.orig.tar.xz Result: your labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:212:6: style: Condition 'hasDateTime' is always false [knownConditionTrueFalse] labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:167:21: note: Assignment 'hasDateTime=false', assigned value is 0 labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:169:11: note: Assuming condition is true labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:200:17: note: Assuming condition is false labplot-2.12.1/src/frontend/widgets/ValueWidget.cpp:212:6: note: Condition 'hasDateTime' is always false Explanation: `hasDateTime` starts as false at line 167, but line 180 sets it to true when the column's mode is DateTime. So 'Condition hasDateTime is always false' at line 212 is a false positive, both on main and with the PR. The PR does not add or remove the warning. It only changes the error path, adding 'Assuming condition is true' at line 169 and 'Assuming condition is false' at line 200. That path still leads through the block that can set `hasDateTime` to true, so the warning stays equally wrong. The same false positive is reported with different notes, so the change does not matter to users. ---- 102 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/l/licenseutils/licenseutils_0.0.9.orig.tar.gz Result: main licenseutils-0.0.9/src/detect.c:196:11: warning: If memory allocation fails, then there is a possible null pointer dereference: result [nullPointerOutOfMemory] licenseutils-0.0.9/src/detect.c:180:25: note: Assuming allocation function fails licenseutils-0.0.9/src/detect.c:180:25: note: Assignment 'result=malloc(len+1)', assigned value is 0 licenseutils-0.0.9/src/detect.c:196:11: note: Null pointer dereference Explanation: Both versions report the same nullPointerOutOfMemory warning at line 196: `result` comes from an unchecked `malloc` and is dereferenced. Only the error path differs. The new path adds the note 'Assuming condition is true' at line 194 (`!keyword_separator`), which correctly describes how execution reaches line 196. The finding, its location and its validity are unchanged. This is a cosmetic change to the trace that does not matter to users either way. ---- 103 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/l/licenseutils/licenseutils_0.0.9.orig.tar.gz Result: your licenseutils-0.0.9/src/detect.c:196:11: warning: If memory allocation fails, then there is a possible null pointer dereference: result [nullPointerOutOfMemory] licenseutils-0.0.9/src/detect.c:180:25: note: Assuming allocation function fails licenseutils-0.0.9/src/detect.c:180:25: note: Assignment 'result=malloc(len+1)', assigned value is 0 licenseutils-0.0.9/src/detect.c:194:16: note: Assuming condition is true licenseutils-0.0.9/src/detect.c:196:11: note: Null pointer dereference Explanation: Both versions report the same nullPointerOutOfMemory warning at line 196, where `result` from an unchecked `malloc` is written. Only the error path changed: it now has an extra note, 'Assuming condition is true', at line 194 (`else if (!keyword_separator)`). That note is technically correct, since line 196 runs only when that condition holds. It is irrelevant to whether `result` is null, though, and the warning itself is unchanged. The change does not matter to users. ---- 104 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lucene++/lucene++_3.0.9.orig.tar.gz Result: main LucenePlusPlus-rel_3.0.9/src/core/search/WildcardTermEnum.cpp:102:13: style: Condition 'sEnd' is always false [knownConditionTrueFalse] LucenePlusPlus-rel_3.0.9/src/core/search/WildcardTermEnum.cpp:70:13: note: Assuming that condition 'sEnd' is not redundant LucenePlusPlus-rel_3.0.9/src/core/search/WildcardTermEnum.cpp:102:13: note: Condition 'sEnd' is always false Explanation: Inside 'if (sEnd)', the code only returns when justWildcardsLeft stays true, or when it sees a WILDCARD_CHAR. If the while loop finds a non-wildcard character, justWildcardsLeft becomes false and the path falls through to line 102 with sEnd still true. Example: string "ab", pattern "abc" reaches line 102 with sEnd == true and breaks there. So 'sEnd' is not always false at line 102, and main's warning was a false positive. This is the #15264 pattern the PR targets: a flag set in a loop decides whether the path leaves the block, and main wrongly treated every path through the block as escaping. Removing the warning is correct. ---- 105 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/luckybackup/luckybackup_0.5.0.orig.tar.gz Result: your luckybackup-0.5.0/src/luckybackupwindow.cpp:1314:11: style: Condition 'taskChanged' is always true [knownConditionTrueFalse] luckybackup-0.5.0/src/luckybackupwindow.cpp:1305:9: note: Assuming that condition '!taskChanged' is not redundant luckybackup-0.5.0/src/luckybackupwindow.cpp:1314:11: note: Condition 'taskChanged' is always true Explanation: When '!taskChanged' holds, the block always returns on every path: both the 'taskClicked = false' branch and the 'taskChanged = true' branch end at 'return'. So at line 1314 taskChanged is always true, and the '(taskChanged)' part of the condition is redundant. taskChanged is a member variable, but there is no function call between lines 1305 and 1314 that could change it. The new warning is a true positive. Main probably missed it because a path that was split inside the block (the then branch modifies taskChanged) made the escape look partial or modified. The PR now sees that every path escapes. ---- 106 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libf/libfsxfs/libfsxfs_20240501.orig.tar.gz Result: main libfsxfs-20240501/libfsxfs/libfsxfs_extent_btree.c:324:3: warning: Either the condition 'last_extent==NULL' is redundant or there is possible null pointer dereference: last_extent. [nullPointerRedundantCheck] libfsxfs-20240501/libfsxfs/libfsxfs_extent_btree.c:287:21: note: Assuming that condition 'last_extent==NULL' is not redundant libfsxfs-20240501/libfsxfs/libfsxfs_extent_btree.c:324:3: note: Null pointer dereference Explanation: When `last_extent == NULL`, the code always enters the if block. Inside it, every path either jumps to `on_error` or assigns `last_extent = sparse_extent`. `sparse_extent` is non-null at that point: it was set by `libfsxfs_extent_initialize` and already dereferenced at line 303. So `last_extent` cannot be NULL at line 324, and the old nullPointerRedundantCheck was a false positive. The PR's better tracking of which paths actually reach the end of the block removes it. ---- 107 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libf/libfsxfs/libfsxfs_20240501.orig.tar.gz Result: main libfsxfs-20240501/libfsxfs/libfsxfs_extent_list.c:127:3: warning: Either the condition 'last_extent==NULL' is redundant or there is possible null pointer dereference: last_extent. [nullPointerRedundantCheck] libfsxfs-20240501/libfsxfs/libfsxfs_extent_list.c:90:21: note: Assuming that condition 'last_extent==NULL' is not redundant libfsxfs-20240501/libfsxfs/libfsxfs_extent_list.c:127:3: note: Null pointer dereference Explanation: The PR removes a false positive. When `last_extent == NULL`, the if block either jumps to `on_error` or assigns `last_extent = sparse_extent`. At that point `sparse_extent` cannot be NULL: `libfsxfs_extent_initialize()` succeeded and it was already dereferenced at lines 106–107. So at line 127 `last_extent` is never NULL, and the old nullPointerRedundantCheck was wrong. ---- 108 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libf/libfsxfs/libfsxfs_20240501.orig.tar.gz Result: your libfsxfs-20240501/libcsplit/libcsplit_narrow_string.c:144:21: style: Condition 'segment_end!=NULL' is always true [knownConditionTrueFalse] Explanation: Inside the do-while body, line 131 breaks out whenever `segment_end == NULL`. The code after that (lines 135-142) only changes `segment_start`, never `segment_end`. Every path that reaches the loop condition at line 144 therefore has `segment_end != NULL`. The condition is always true, and the loop only ends through its `break` statements. The new knownConditionTrueFalse warning is a correct true positive (a redundant condition), so the PR's better path tracking found a real finding. ---- 109 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libl/liblognorm/liblognorm_2.1.1.orig.tar.gz Result: your rsyslog-liblognorm-7473a9a/src/pdag.c:1283:11: style: Condition 'meta==NULL' is always true [knownConditionTrueFalse] rsyslog-liblognorm-7473a9a/src/pdag.c:1258:29: note: Assignment 'meta=NULL', assigned value is 0 rsyslog-liblognorm-7473a9a/src/pdag.c:1262:15: note: Assuming condition is true rsyslog-liblognorm-7473a9a/src/pdag.c:1271:15: note: Assuming condition is false rsyslog-liblognorm-7473a9a/src/pdag.c:1282:15: note: Assuming condition is true rsyslog-liblognorm-7473a9a/src/pdag.c:1283:11: note: Condition 'meta==NULL' is always true Explanation: `meta` is set to NULL at line 1258. Nothing assigns it before the check `if(meta == NULL)` at line 1283; the code in between only touches `meta_rule`. So the condition really is always true on every path that reaches it. The new warning is a correct knownConditionTrueFalse. The code looks like a defensive copy-paste pattern, but the redundancy is real and this is the kind of case the check is meant to catch. The "Assuming condition" notes are slightly noisy, but they do not affect correctness. ---- 110 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libs/libsolv/libsolv_0.7.40.orig.tar.gz Result: main libsolv-0.7.40/ext/solv_ed25519.h:327:35: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libsolv-0.7.40/ext/solv_ed25519.h:323:12: note: Assignment 'i=255', assigned value is 255 libsolv-0.7.40/ext/solv_ed25519.h:325:11: note: Assuming condition is true libsolv-0.7.40/ext/solv_ed25519.h:327:35: note: Shift Explanation: The warning is a true positive and is kept. On the first loop iteration i is 255, so i % MP_T_BITS is 31, and `1 << 31` on a signed int is undefined behaviour. Only the error path changed: the note "Assuming condition is true" at line 325 was dropped. That condition is `if (dodouble)`, which has nothing to do with i. It is also false on the first iteration, where i is 255. The old note was irrelevant and misleading, so the new trace is more accurate. ---- 111 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libs/libsolv/libsolv_0.7.40.orig.tar.gz Result: main libsolv-0.7.40/ext/solv_ed25519.h:328:35: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libsolv-0.7.40/ext/solv_ed25519.h:323:12: note: Assignment 'i=255', assigned value is 255 libsolv-0.7.40/ext/solv_ed25519.h:325:11: note: Assuming condition is true libsolv-0.7.40/ext/solv_ed25519.h:328:35: note: Shift Explanation: The warning itself is unchanged and is a true positive: `i % MP_T_BITS` reaches 31, and `1 << 31` on a signed int is undefined behaviour. Only the error path changed. Main included the note "Assuming condition is true" at line 325 (`if (dodouble)`). That condition has no bearing on the shift. It is also false on the very iteration the path describes: `i=255` is the first iteration, where `dodouble` is still 0. The PR drops this misleading step, so the error path is more accurate. ---- 112 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libs/libsolv/libsolv_0.7.40.orig.tar.gz Result: your libsolv-0.7.40/ext/solv_ed25519.h:327:35: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libsolv-0.7.40/ext/solv_ed25519.h:323:12: note: Assignment 'i=255', assigned value is 255 libsolv-0.7.40/ext/solv_ed25519.h:327:35: note: Shift Explanation: The warning itself is unchanged and is a true positive. With i=255 and 32-bit mp_t, `1 << (i % MP_T_BITS)` evaluates `1 << 31` on a signed int, which is undefined behaviour. The PR only drops the error-path note 'Assuming condition is true' for `if (dodouble)` at line 325. That condition has nothing to do with the shift, which runs on every iteration. On the first iteration, where i=255, dodouble is actually 0, so the old note was misleading. The new error path is shorter and more accurate. ---- 113 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libs/libsolv/libsolv_0.7.40.orig.tar.gz Result: your libsolv-0.7.40/ext/solv_ed25519.h:328:35: error: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] libsolv-0.7.40/ext/solv_ed25519.h:323:12: note: Assignment 'i=255', assigned value is 255 libsolv-0.7.40/ext/solv_ed25519.h:328:35: note: Shift Explanation: Both versions report the same warning at line 328: `1 << (i % MP_T_BITS)` with i=255 shifts a signed int by 31 bits, which is a true positive. The only change is in the error path. Main added the note "Assuming condition is true" for `if (dodouble)` at line 325. That condition does not involve i, and it is actually false on the first iteration, where i=255 (dodouble is still 0). With the PR the irrelevant and misleading note is gone, and the path shows only the assignment i=255 and the shift. The message is more accurate. ---- 114 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libt/libtext-markdown-discount-perl/libtext-markdown-discount-perl_0.18.orig.tar.gz Result: main Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:67:6: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:44:21: note: Assuming allocation function fails Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:44:21: note: Assignment 'p=calloc(sizeof(*p),1)', assigned value is 0 Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:54:20: note: Assuming condition is false Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:64:14: note: Assuming condition is true Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:65:13: note: Assuming condition is true Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:67:6: note: Null pointer dereference Explanation: The warning at line 67 is the same true positive in both versions: a calloc result is dereferenced without a null check. Only the error path changed. Main's path included the step 'Assuming condition is true' at line 65 (c == '|'). That condition is irrelevant, because the EXPAND at line 67 runs whether or not c is '|'. The new path omits that unrelated step and is more accurate. One caveat: p is already dereferenced at lines 50/51 via CREATE/ATTACH, so the reported location is arguably not the first dereference, but that is the same in both versions. ---- 115 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libt/libtext-markdown-discount-perl/libtext-markdown-discount-perl_0.18.orig.tar.gz Result: your Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:67:6: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:44:21: note: Assuming allocation function fails Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:44:21: note: Assignment 'p=calloc(sizeof(*p),1)', assigned value is 0 Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:54:20: note: Assuming condition is false Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:64:14: note: Assuming condition is true Text-Markdown-Discount-0.18/discount-2.2.7d/mkdio.c:67:6: note: Null pointer dereference Explanation: Both versions report the same nullPointerOutOfMemory at line 67; only the error path differs. Main's path included 'Assuming condition is true' at line 65 (c == '|'). That path would already dereference p at line 66 (p->flags |= PIPECHAR), so line 67 would not be the first dereference on it. The new path skips the 'if (c == '|')' block and goes straight to EXPAND(p->text) at 67, which is the more natural and consistent path for this warning. The warning itself is unchanged and is technically a true positive: calloc's result is unchecked. The slightly cleaner error path makes the message marginally more accurate. ---- 116 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libx/libxfont/libxfont_2.0.10.orig.tar.gz Result: main libXfont2-2.0.10/src/FreeType/ftfuncs.c:1468:9: style: Condition '0<=jj' is always true [knownConditionTrueFalse] libXfont2-2.0.10/src/FreeType/ftfuncs.c:1462:14: note: j is assigned '(0)>(div_dx)?(0):(div_dx)' here. libXfont2-2.0.10/src/FreeType/ftfuncs.c:1463:17: note: Assignment 'jj=j-div_dx', assigned value is greater than -1 libXfont2-2.0.10/src/FreeType/ftfuncs.c:1465:11: note: Assuming condition is true libXfont2-2.0.10/src/FreeType/ftfuncs.c:1466:20: note: Assuming condition is true libXfont2-2.0.10/src/FreeType/ftfuncs.c:1468:9: note: Condition '0<=jj' is always true Explanation: The warning is the same on both sides and is a true positive: j = MAX(0,div_dx) means jj = j - div_dx is never negative, so '0<=jj' is always true. The only change is that the PR drops the note 'Assuming condition is true' at line 1466. The if at line 1466 only does 'current_raster[j] |= ...' and does not touch jj, so that assumption plays no part in the conclusion. The error path is now shorter and more accurate. ---- 117 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libx/libxfont/libxfont_2.0.10.orig.tar.gz Result: your libXfont2-2.0.10/src/FreeType/ftfuncs.c:1468:9: style: Condition '0<=jj' is always true [knownConditionTrueFalse] libXfont2-2.0.10/src/FreeType/ftfuncs.c:1462:14: note: j is assigned '(0)>(div_dx)?(0):(div_dx)' here. libXfont2-2.0.10/src/FreeType/ftfuncs.c:1463:17: note: Assignment 'jj=j-div_dx', assigned value is greater than -1 libXfont2-2.0.10/src/FreeType/ftfuncs.c:1465:11: note: Assuming condition is true libXfont2-2.0.10/src/FreeType/ftfuncs.c:1468:9: note: Condition '0<=jj' is always true Explanation: Both versions report the same warning, and it is a true positive. j = MAX(0, div_dx), so jj = j - div_dx = max(-div_dx, 0), which is always >= 0. The only difference is in the error path: the PR drops the note 'Assuming condition is true' at 1466:20. That note refers to the prev_jj check, an if whose body does not affect jj, and it has no bearing on why '0<=jj' is always true. The new path keeps only the relevant steps (the assignment of j and jj, and the j0' is always false [knownConditionTrueFalse] libxisf-0.2.15/zlib/contrib/minizip/mztools.c:144:27: note: Assignment 'comment=""', assigned value is "" libxisf-0.2.15/zlib/contrib/minizip/mztools.c:145:25: note: Assignment 'comsize=(int)strlen(comment)', assigned value is 0 libxisf-0.2.15/zlib/contrib/minizip/mztools.c:164:46: note: Assuming condition is true libxisf-0.2.15/zlib/contrib/minizip/mztools.c:168:24: note: Assuming condition is true libxisf-0.2.15/zlib/contrib/minizip/mztools.c:169:56: note: Assuming condition is true libxisf-0.2.15/zlib/contrib/minizip/mztools.c:191:25: note: Condition 'comsize>0' is always false Explanation: Line 144 sets `comment` to "" and line 145 sets `comsize = (int)strlen(comment)`, so `comsize` is 0. Between there and line 191 `comsize` is only read (e.g. by `WRITE_16`), never changed. So `comsize > 0` at line 191 really is always false. The comment block is dead code left in on purpose as a placeholder, but the warning is correct. The new path handling lets Cppcheck keep the known value past the earlier `if` blocks that `break`, so this is a new true positive. ---- 119 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libx/libxlsxwriter/libxlsxwriter_1.2.5.orig.tar.gz Result: your jmcnamara-libxlsxwriter-282500e/third_party/minizip/mztools.c:191:25: style: Condition 'comsize>0' is always false [knownConditionTrueFalse] jmcnamara-libxlsxwriter-282500e/third_party/minizip/mztools.c:144:27: note: Assignment 'comment=""', assigned value is "" jmcnamara-libxlsxwriter-282500e/third_party/minizip/mztools.c:145:25: note: Assignment 'comsize=(int)strlen(comment)', assigned value is 0 jmcnamara-libxlsxwriter-282500e/third_party/minizip/mztools.c:164:46: note: Assuming condition is true jmcnamara-libxlsxwriter-282500e/third_party/minizip/mztools.c:168:24: note: Assuming condition is true jmcnamara-libxlsxwriter-282500e/third_party/minizip/mztools.c:169:56: note: Assuming condition is true jmcnamara-libxlsxwriter-282500e/third_party/minizip/mztools.c:191:25: note: Condition 'comsize>0' is always false Explanation: At lines 144-145 the code sets `comment = ""` and `comsize = (int)strlen(comment)`, so `comsize` is 0. Nothing between there and line 191 changes `comsize`: `WRITE_16` only reads it, and the paths in between either `break` or fall through unchanged. So `comsize > 0` really is always false. This is the same pattern as the final directory block, where the comment text is commented out. The PR now keeps the known value along the paths that continue past the inner if/break blocks, adding a correct style warning. ---- 120 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libz/libzeem/libzeem_2.1.2+dfsg.orig.tar.xz Result: main zeem-2.1.2/src/parser.cpp:2032:16: style: Condition 'dtd.get()!=nullptr' is always false [knownConditionTrueFalse] zeem-2.1.2/src/parser.cpp:1968:31: note: Assignment 'std::unique_ptrdtd', assigned value is 0 zeem-2.1.2/src/parser.cpp:2032:16: note: Condition 'dtd.get()!=nullptr' is always false Explanation: `dtd` starts as nullptr at line 1968, but on the external-id path line 2010 calls `dtd.reset(get_data_source(pubid, uri))`, so it can be non-null at line 2032. The condition `dtd.get() != nullptr` is therefore not always false, and main's warning was a false positive. The PR tracks the paths that leave the conditional blocks more accurately, which removes this false positive. ---- 121 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mdadm/mdadm_4.6.orig.tar.xz Result: your mdadm-4.6/util.c:2487:9: warning: If memory allocation fails, then there is a possible null pointer dereference: addr [nullPointerOutOfMemory] mdadm-4.6/util.c:2467:13: note: Assuming allocation function fails mdadm-4.6/util.c:2467:13: note: Assignment 'addr=mmap(NULL,len,PROT_READ,MAP_PRIVATE,fd_zero,0)', assigned value is 0 mdadm-4.6/util.c:2477:9: note: Assuming condition is false mdadm-4.6/util.c:2487:9: note: Null pointer dereference Explanation: mmap reports failure by returning MAP_FAILED, not NULL, and the code checks `addr == MAP_FAILED` and jumps to `out` in that case. When munmap(addr, len) at line 2487 is reached, addr is a valid mapping. The 'assigned value is 0' premise does not match how mmap fails, so this new nullPointerOutOfMemory warning is a false positive. It appears because the PR changed how paths through the do-while loop and its break are joined. ---- 122 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mfgtools/mfgtools_1.5.243.orig.tar.gz Result: main mfgtools-uuu_1.5.243/libuuu/sparse.cpp:138:15: error: Using pointer to member variable 'm_data' that may be invalid. [invalidContainer] mfgtools-uuu_1.5.243/libuuu/sparse.cpp:115:40: note: Pointer to container is created here. mfgtools-uuu_1.5.243/libuuu/sparse.cpp:121:6: note: Assuming condition is true mfgtools-uuu_1.5.243/libuuu/sparse.cpp:127:12: note: Assuming condition is true mfgtools-uuu_1.5.243/libuuu/sparse.cpp:137:12: note: Assuming condition is true mfgtools-uuu_1.5.243/libuuu/sparse.cpp:121:6: note: Assuming condition is true. mfgtools-uuu_1.5.243/libuuu/sparse.cpp:137:12: note: Assuming condition is true. mfgtools-uuu_1.5.243/libuuu/sparse.cpp:135:3: note: Calling function push mfgtools-uuu_1.5.243/libuuu/sparse.cpp:104:9: note: After calling 'resize', iterators or references to the container's data may be invalid . mfgtools-uuu_1.5.243/libuuu/sparse.cpp:138:15: note: Using pointer to member variable 'm_data' that may be invalid. Explanation: Both versions report the same invalidContainer warning at line 138. It is a true positive: `pheader` points into `m_data.data()`, `push()` calls `m_data.resize()`, and `pheader->blk_sz` is then read through a possibly dangling pointer. The only difference is that the error path no longer lists 'Assuming condition is true' at line 127. That `if (type == CHUNK_TYPE_RAW)` only adjusts the local `header.total_sz` and is the same condition as line 137, so it has no bearing on whether `pheader` is valid. The new path is slightly shorter but just as correct; the warning, its location and its validity are unchanged. ---- 123 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mfgtools/mfgtools_1.5.243.orig.tar.gz Result: your mfgtools-uuu_1.5.243/libuuu/sparse.cpp:138:15: error: Using pointer to member variable 'm_data' that may be invalid. [invalidContainer] mfgtools-uuu_1.5.243/libuuu/sparse.cpp:115:40: note: Pointer to container is created here. mfgtools-uuu_1.5.243/libuuu/sparse.cpp:121:6: note: Assuming condition is true mfgtools-uuu_1.5.243/libuuu/sparse.cpp:137:12: note: Assuming condition is true mfgtools-uuu_1.5.243/libuuu/sparse.cpp:121:6: note: Assuming condition is true. mfgtools-uuu_1.5.243/libuuu/sparse.cpp:137:12: note: Assuming condition is true. mfgtools-uuu_1.5.243/libuuu/sparse.cpp:135:3: note: Calling function push mfgtools-uuu_1.5.243/libuuu/sparse.cpp:104:9: note: After calling 'resize', iterators or references to the container's data may be invalid . mfgtools-uuu_1.5.243/libuuu/sparse.cpp:138:15: note: Using pointer to member variable 'm_data' that may be invalid. Explanation: The invalidContainer warning is still reported. It is a true positive: `pheader` points into `m_data`, `push()` resizes `m_data`, and `pheader->blk_sz` is read afterwards at line 138. The only change is that the error path no longer has the 'Assuming condition is true' note at line 127 (`type == CHUNK_TYPE_RAW`). That is the same condition as the one at line 137, which is still listed, and it is not needed to explain the bug. The difference is cosmetic and does not matter to users. ---- 124 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/moosefs/moosefs_4.59.2.orig.tar.xz Result: your moosefs-4.59.2/mfsclient/readdata.c:2565:46: style: Condition 'cnt>0' is always false [knownConditionTrueFalse] moosefs-4.59.2/mfsclient/readdata.c:2248:8: note: Assignment 'cnt=0', assigned value is 0 moosefs-4.59.2/mfsclient/readdata.c:2565:46: note: Condition 'cnt>0' is always false Explanation: `cnt` starts at 0 (line 2248) but is incremented with `cnt++` at lines 2544 and 2550, inside the read loop just above line 2565. That loop runs when `ind->status==0`, so on real paths `cnt` can clearly be greater than 0 when the check is reached. 'Condition cnt>0 is always false' is therefore almost certainly a false positive. It most likely comes from the PR's new path splitting and joining: the paths that increment `cnt` are wrongly dropped or treated as stopped, so the value 0 stays known after the loop. The code between lines 2248 and 2525 is not shown, so this is not fully certain. ---- 125 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mosquitto/mosquitto_2.1.4.orig.tar.xz Result: main mosquitto-2.1.4/libcommon/topic_common.c:653:29: style: Condition 'sposbShmUnreliable` is set. When `walIndexReadHdr` succeeds and shm is reliable, the path falls through with useWal==0, so `!useWal` can be true at line 62090. Main wrongly treated the block as always escaping, likely because one path through the nested ifs ends in a return. The PR's tracking of paths that only partly terminate fixes this, so a false positive was removed. ---- 127 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mstflint/mstflint_4.33.0+1.orig.tar.gz Result: main mstflint-4.33.0/ext_libs/sqlite/sqlite3.c:63719:7: style: Condition '!useWal' is always false [knownConditionTrueFalse] Explanation: The `!useWal` check at line 63719 comes right after the `if( !useWal ){ ... }` block. That block does not always return. It returns only when rc!=SQLITE_OK or when bShmUnreliable is set. When rc==SQLITE_OK and bShmUnreliable==0, control falls through with useWal==0, so `!useWal` can be true. Main wrongly treated the whole block as escaping on every path and reported the condition as always false. The PR tracks paths that do not all terminate, which removes this false positive. ---- 128 / 291 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mstflint/mstflint_4.33.0+1.orig.tar.gz Result: main mstflint-4.33.0/mlxlink/modules/mlxlink_cables_commander.cpp:1674:85: style: Parameter 'params' can be declared as reference to const [constParameterReference] Explanation: `checkPMCRFieldsCap` takes `vector>& params`. In the code shown it only iterates the vector and reads `it->first` and `it->second`: it uses them for lookups and passes `it->second` to `pmcrStrToValue`. As the name suggests, the function only validates the values. So the constParameterReference warning from main looks like a true positive. The PR only changes forward value-flow path handling and does not make the parameter less const-able, so losing the warning is most likely a side effect of the analysis change: a new false negative. The confidence is low because the rest of the function body and the signature of `pmcrStrToValue` are not shown. ---- 129 / 291 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/algo/blast/core/ncbi_erf.c:169:5: error: Uninitialized variable: k [legacyUninitvar] Explanation: The removed legacyUninitvar error at line 169 is replaced by a uninitvar warning at the same spot, so this is a message change rather than a lost finding. The flagged path is real in the code's structure: if hx < 0x3e300000 and 'huge+x>one' is false, k is never assigned before 'if(k==0)'. In practice that path is infeasible, because huge is 1e300, so the issue is effectively a false positive in both versions. The new message is still more useful: it names the exact path (line 150 false, 161 true, 162 false), so a user can see why it fires and judge it. It also reports at warning severity instead of error, which suits a path-dependent finding. Overall the message got slightly more accurate and useful. ---- 130 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/api/jzcoll.c:4407:9: style: Condition 'list' is always true [knownConditionTrueFalse] Explanation: Line 4407 is the inner `while (list && list->choice == OBJ_SEQANNOT)` loop. `list` is non-null only on the first check, guaranteed by the outer `while (list != NULL)`. The loop body then does `list = list->next`, so `list` can become NULL on a later check, and the null test is needed to end the loop safely. 'Condition list is always true' was therefore a false positive, and the PR removes it. ---- 131 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/api/salpstat.c:619:10: style: Condition 'lcl_gap_list' is always false [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/api/salpstat.c:583:36: note: Calling function 'DenseDiagGapList' returns 0 ncbi-tools6_6.1.20170106+dfsg2/api/salpstat.c:618:37: note: Calling function 'SeqAlignGapList' returns 0 ncbi-tools6_6.1.20170106+dfsg2/api/salpstat.c:618:37: note: Assignment 'lcl_gap_list=SeqAlignGapList(c_align,&this_gap_num)', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/salpstat.c:619:10: note: Condition 'lcl_gap_list' is always false Explanation: `SeqAlignGapList()` returns the result of one of several helpers (`DenseDiagGapList`, `DenseSegGapList`, `StdSegGapList`, `PackSegGapList`) depending on `segtype`. These helpers build and return allocated gap lists, so `lcl_gap_list` cannot always be NULL. The trace rests only on `DenseDiagGapList` returning 0 and ignores the other return paths. The warning would make the whole merge loop dead code, which is implausible for this utility. The old warning likely came from the path-merging imprecision this PR fixes, so removing it removes a false positive. ---- 132 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6902:14: style: Condition 'result==NULL' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6682:9: note: Assignment 'ptr=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6900:37: note: Calling function 'x_CatenateValNodeStrings' returns 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6900:37: note: Assignment 'result=x_CatenateValNodeStrings(strings)', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6902:14: note: Condition 'result==NULL' is always true Explanation: Main claimed that x_CatenateValNodeStrings() always returns 0, tracing only the initial 'ptr = NULL' at line 6682. That function concatenates the strings in the list into a newly allocated buffer, so it returns non-NULL whenever the list has text. 'result == NULL' at line 6902 is therefore not always true. The PR improves how paths through branches are joined, so this false positive is gone, as are the identical ones at the other call sites. ---- 133 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7063:14: style: Condition 'result==NULL' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6682:9: note: Assignment 'ptr=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7061:37: note: Calling function 'x_CatenateValNodeStrings' returns 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7061:37: note: Assignment 'result=x_CatenateValNodeStrings(strings)', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7063:14: note: Condition 'result==NULL' is always true Explanation: `result` comes from `x_CatenateValNodeStrings(strings)`. That helper builds and returns a concatenated string from the list. The `ptr=NULL` at line 6682 is only the initial value or an early-exit path, so the helper does not always return NULL. The code before line 7061 always adds strings to the list, so `result == NULL` at line 7063 is a real runtime check, not always true. The PR changes how paths that stop on some branches but not others are combined. That removed this false positive along with the identical ones at the other `x_CatenateValNodeStrings` call sites. ---- 134 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7410:14: style: Condition 'result==NULL' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6682:9: note: Assignment 'ptr=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7408:37: note: Calling function 'x_CatenateValNodeStrings' returns 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7408:37: note: Assignment 'result=x_CatenateValNodeStrings(strings)', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:7410:14: note: Condition 'result==NULL' is always true Explanation: Main claimed that 'result == NULL' is always true because x_CatenateValNodeStrings() always returns 0. Its only evidence is 'ptr = NULL' at line 6682, the initialisation at the start of that helper. A function that concatenates the strings of a ValNode list normally allocates a buffer and returns it whenever the list is non-empty. Here 'strings' is filled conditionally just before the call, so the result can be non-NULL and the condition is not always true. The warning was a false positive from a value-flow path that ignored the later assignment in the helper. The PR's more precise path handling removes it, together with the four identical tofasta.c warnings. ---- 135 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8161:14: style: Condition 'result==NULL' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6682:9: note: Assignment 'ptr=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8159:37: note: Calling function 'x_CatenateValNodeStrings' returns 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8159:37: note: Assignment 'result=x_CatenateValNodeStrings(strings)', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8161:14: note: Condition 'result==NULL' is always true Explanation: Main claimed that `x_CatenateValNodeStrings(strings)` always returns 0, so `result == NULL` at line 8161 would always be true. Its only evidence is the initial `ptr = NULL` at line 6682. That function's body is not shown, but its job is to join the strings of the list into a new buffer and return it. It cannot always return NULL, especially after strings were added to `strings` (e.g. `dlp->m_taxname`). So the warning was a false positive: an earlier path state wrongly survived to the return. The same bogus warning also disappears at the other `x_CatenateValNodeStrings` call sites (6902, 7063, 7410, 8224). The PR's more precise path handling removes it. ---- 136 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8224:14: style: Condition 'result==NULL' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:6682:9: note: Assignment 'ptr=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8222:37: note: Calling function 'x_CatenateValNodeStrings' returns 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8222:37: note: Assignment 'result=x_CatenateValNodeStrings(strings)', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/api/tofasta.c:8224:14: note: Condition 'result==NULL' is always true Explanation: Main claimed that x_CatenateValNodeStrings() always returns 0. Its only evidence was the initialization 'ptr = NULL' at line 6682. A function that concatenates a ValNode list of strings returns a newly allocated string whenever the list has text, and here 'strings' is filled by many conditional ValNodeCopyStr calls. So 'result == NULL' at line 8224 is not always true, and the warning was a false positive. The same bogus warning disappears for every caller of this function (lines 6902, 7063, 7410, 8161, 8224). This fits the PR's more accurate handling of paths that part for good. The function body is not shown, which is why confidence is medium. ---- 137 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2558:7: warning: Uninitialized variable: *buf [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2338:18: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2481:12: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2484:13: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2558:7: note: Uninitialized variable: *buf Explanation: The same uninitvar warning for '*buf' at asnprint.c:2558 is reported by both versions. Only the error path differs: main assumes the condition at line 2481 is true and the one at 2484 is false, while the PR assumes the condition at 2481 is false. The shown code does not include lines 2338–2484, so neither path can be checked. Whether the warning is right depends on whether StringMove writes into buf through tmp, and that is the same in both versions. Changing which path is shown does not matter much to users. ---- 138 / 291 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/asnlib/asntypes.c:1012:7: warning: Uninitialized variable: *buf [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/asnlib/asntypes.c:914:19: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/asnlib/asntypes.c:917:17: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/asnlib/asntypes.c:1012:7: note: Uninitialized variable: *buf Explanation: At line 1012 the code reads `*buf` after `buf` has been filled through the alias `tmp` (`tmp = StringMove(tmp, ...)`). Cppcheck does not follow these writes through the alias. The removed warning claimed `*buf` is uninitialized on the path where the conditions at lines 914 and 917 are true. Those lines are not shown, but in code of this shape `buf` is normally set up (`tmp = buf`, a terminating '\0' or StringMove calls) before it is read. So the warning is most likely a false positive. Its removal fits the PR, which changes which forked paths are carried past an undecided if. A real path that leaves `buf` unwritten cannot be ruled out without lines 914–917, hence low confidence. ---- 139 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/corelib/ncbithr.c:2331:11: style: Condition '!TLS' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/corelib/ncbithr.c:2326:17: note: Assignment 'TLS=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/corelib/ncbithr.c:2331:11: note: Condition '!TLS' is always true Explanation: The `while ( !TLS )` loop is entered with `TLS = NULL`, but `TLS` is reassigned inside the body (`TLS = *pTLS`, or the `Calloc` result). When the allocation succeeds and `err_code == 0`, the body ends without a break. The loop condition is then checked again with `TLS` non-null and the loop exits. So the condition is not always true, and the removed knownConditionTrueFalse warning was a false positive. ---- 140 / 291 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: main ncbi-tools6_6.1.20170106+dfsg2/desktop/mapgene.c:1018:12: style: Condition 'prev==NULL' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/desktop/mapgene.c:1005:9: note: Assignment 'prev=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/desktop/mapgene.c:1011:22: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/desktop/mapgene.c:1016:6: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/desktop/mapgene.c:1018:12: note: Condition 'prev==NULL' is always true Explanation: In load_align_by_consist, 'prev' is set to NULL before the loop and never reassigned. 'prev->next = next' only writes through the pointer and does not change 'prev'. So 'prev == NULL' at line 1018 really is always true, and the code has a real bug: it should update prev in a not-found branch. Main's warning was a true positive. The PR drops it, probably because the new path splitting around the 'found' flag set by unknown calls lowers the value to possible. This is a new false negative. ---- 141 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: your ncbi-tools6_6.1.20170106+dfsg2/algo/blast/core/ncbi_erf.c:169:5: warning: Uninitialized variable: k [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/algo/blast/core/ncbi_erf.c:150:8: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/algo/blast/core/ncbi_erf.c:161:13: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/algo/blast/core/ncbi_erf.c:162:15: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/algo/blast/core/ncbi_erf.c:169:5: note: Uninitialized variable: k Explanation: This is the fdlibm exp code. `k` is left unset only on the `|x| < 2**-28` branch, and only if `huge+x>one` is false. With `huge = 1e300` that condition is always true in practice, so the path is effectively infeasible, though it is syntactically possible. Main already reported the same variable at the same line as legacyUninitvar. The PR replaces that with a ValueFlow-based uninitvar warning that names the same issue and adds a path. The underlying finding did not change: it was reported before and is reported now, just by a different checker with a more explanatory path. So the change does not matter much to users either way. ---- 142 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: your ncbi-tools6_6.1.20170106+dfsg2/api/salpedit.c:575:34: style: Condition 's_gap_size>=0' is always false [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/api/salpedit.c:534:16: note: Assignment 's_gap_size=-1', assigned value is -1 ncbi-tools6_6.1.20170106+dfsg2/api/salpedit.c:535:26: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/api/salpedit.c:575:34: note: Condition 's_gap_size>=0' is always false Explanation: s_gap_size is set to -1 at line 534, but it can be reassigned to a non-negative value before line 575: 'from - s_first' at line 563 (guarded by s_first <= from) or 's_first - to' at line 571 (guarded by s_first >= to). So 's_gap_size>=0' can be true and is not always false. The new knownConditionTrueFalse warning is a false positive. The PR's path splitting drops the modifications made in the nested if blocks. ---- 143 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: your ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2558:7: warning: Uninitialized variable: *buf [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2338:18: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2481:12: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/asnlib/asnprint.c:2558:7: note: Uninitialized variable: *buf Explanation: Main already reported the same uninitvar warning for '*buf' at asnprint.c:2558. Only the error path differs: the PR's path assumes the condition at line 2481 is false, while main's assumed it true and the one at 2484 false. Both paths most likely reach code where 'tmp = StringMove(tmp, ...)' writes into buf through tmp, so both warnings look like the same likely false positive. The code before line 2518 is not shown, so this cannot be confirmed. The location and message are unchanged; only the explanatory notes moved, which matters little to users. ---- 144 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: your ncbi-tools6_6.1.20170106+dfsg2/demo/asnmacro.c:261:10: warning: Uninitialized variable: aip [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/demo/asnmacro.c:238:16: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/demo/asnmacro.c:240:28: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/demo/asnmacro.c:261:10: note: Uninitialized variable: aip Explanation: The code really reads an uninitialized variable. When osp->aip == NULL and StringDoesHaveText(osp->outfile) is true, the code only copies the file name into 'path' and never assigns 'aip'. The function then returns 'aip' at line 261 uninitialized. This is a genuine bug: the branch is missing an AsnIoOpen call. The same pattern appears in asnstrip.c and raw2delt.c, which the PR now also reports. The PR adds a true positive. ---- 145 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: your ncbi-tools6_6.1.20170106+dfsg2/demo/asnstrip.c:173:10: warning: Uninitialized variable: aip [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/demo/asnstrip.c:150:16: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/demo/asnstrip.c:152:28: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/demo/asnstrip.c:173:10: note: Uninitialized variable: aip Explanation: The new warning is a true positive. In AsnIoFromOutputStream, when `osp->aip == NULL` and `StringDoesHaveText(osp->outfile)` is true, the code only copies outfile into `path`. It never assigns `aip`, then returns it uninitialized at line 173. The reported path (150 true, 152 true) is exactly this real bug. The same pattern was newly found in asnmacro.c and raw2delt.c, consistent with better path splitting in the PR. ---- 146 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: your ncbi-tools6_6.1.20170106+dfsg2/demo/raw2delt.c:167:10: warning: Uninitialized variable: aip [uninitvar] ncbi-tools6_6.1.20170106+dfsg2/demo/raw2delt.c:144:16: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/demo/raw2delt.c:146:28: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/demo/raw2delt.c:167:10: note: Uninitialized variable: aip Explanation: When `osp->aip == NULL` (line 144) and `StringDoesHaveText(osp->outfile)` is true (line 146), the function only copies the outfile into `path` and never assigns `aip`. It then returns the uninitialized `aip` at line 167. This is a real bug (the code presumably meant to call `AsnIoOpen(path, ...)` there), and the warning's path notes describe it exactly. The PR adds a true positive. ---- 147 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncbi-tools6/ncbi-tools6_6.1.20170106+dfsg2.orig.tar.xz Result: your ncbi-tools6_6.1.20170106+dfsg2/desktop/bspview.c:397:13: style: Condition 'sap==NULL' is always true [knownConditionTrueFalse] ncbi-tools6_6.1.20170106+dfsg2/desktop/bspview.c:366:9: note: Assignment 'sap=NULL', assigned value is 0 ncbi-tools6_6.1.20170106+dfsg2/desktop/bspview.c:382:21: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/desktop/bspview.c:383:9: note: Assuming condition is false ncbi-tools6_6.1.20170106+dfsg2/desktop/bspview.c:396:12: note: Assuming condition is true ncbi-tools6_6.1.20170106+dfsg2/desktop/bspview.c:397:13: note: Condition 'sap==NULL' is always true Explanation: `sap` is a local set to NULL at line 366. Nothing between there and line 397 assigns it or takes its address: the if/else-if chain only sets `align_type`, `program_name` and `options`, or returns. So at line 397 `sap == NULL` is always true, and the inner check is redundant. Main missed this, probably because it gave up on the nested branches with early returns. The new knownConditionTrueFalse warning is a true positive. ---- 148 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ndctl/ndctl_85.orig.tar.gz Result: main pmem-ndctl-b30f916/daxctl/device.c:895:23: style: Condition 'val>0' is always true [knownConditionTrueFalse] pmem-ndctl-b30f916/daxctl/device.c:878:10: note: Assuming that condition 'val<=0' is not redundant pmem-ndctl-b30f916/daxctl/device.c:890:10: note: Assuming condition is false pmem-ndctl-b30f916/daxctl/device.c:895:23: note: Condition 'val>0' is always true Explanation: Line 878 returns when val <= 0, so val > 0 really is always true at line 895, and the warning is a true positive in both versions. Only the error-path notes changed. The new path adds the 'if (align > 0)' step at line 881 and the 'if (rc < 0)' step at line 883, which the old path skipped. So the main line disappearing is just the old wording being replaced by a more complete trace of the same warning. The added notes ('Assuming condition is true/false' for the align block) are accurate but unneeded, since val is not touched there. The change is at worst neutral and mildly more informative. ---- 149 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ndctl/ndctl_85.orig.tar.gz Result: your pmem-ndctl-b30f916/daxctl/device.c:895:23: style: Condition 'val>0' is always true [knownConditionTrueFalse] pmem-ndctl-b30f916/daxctl/device.c:878:10: note: Assuming that condition 'val<=0' is not redundant pmem-ndctl-b30f916/daxctl/device.c:881:12: note: Assuming condition is true pmem-ndctl-b30f916/daxctl/device.c:883:10: note: Assuming condition is false pmem-ndctl-b30f916/daxctl/device.c:890:10: note: Assuming condition is false pmem-ndctl-b30f916/daxctl/device.c:895:23: note: Condition 'val>0' is always true Explanation: Both versions report the same true positive. `val <= 0` returns at line 878, and `val` is not changed afterwards, so `val > 0` at line 895 is always true. The only difference is the error path. The new one adds notes at 881 (`align > 0` assumed true) and 883 (`rc < 0` assumed false). These come from the value now being carried along the forked then-path. Like the existing note at 890, they are irrelevant to `val`, so the path is a bit noisier. The warning, its location and its correctness are unchanged, so this does not matter much to users. ---- 150 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/autocmd.c:1316:5: error: Null pointer dereference: auc_win [nullPointer] neovim-0.12.6/src/nvim/autocmd.c:1274:20: note: Assignment 'auc_win=NULL', assigned value is 0 neovim-0.12.6/src/nvim/autocmd.c:1316:5: note: Null pointer dereference Explanation: `auc_win` starts as NULL at line 1274. When `win == NULL`, line 1294 reassigns it from `aucmd_win[auc_idx].auc_win`, after `win_alloc_aucmd_win()` has filled that slot if it was NULL. The dereference at line 1316 is in the else branch of `if (win != NULL)`, so it only runs on the path where `auc_win` was reassigned. The new error claims a definite null dereference coming from the initial `= NULL` assignment, which is a false positive. The PR's new path splitting and joining loses the correlation between the two `win` conditions, or the effect of the reassignment, so Cppcheck now understands this code worse. ---- 151 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/autocmd.c:1317:5: error: Null pointer dereference: auc_win [nullPointer] neovim-0.12.6/src/nvim/autocmd.c:1274:20: note: Assignment 'auc_win=NULL', assigned value is 0 neovim-0.12.6/src/nvim/autocmd.c:1317:5: note: Null pointer dereference Explanation: `auc_win` starts as NULL. It is assigned from `aucmd_win[auc_idx].auc_win` inside the `if (win == NULL)` allocation block, and `win_alloc_aucmd_win()` fills that slot first if it was NULL. Line 1317 is in the else branch of `if (win != NULL)`, so it runs only when `win == NULL`, which is exactly when `auc_win` was set to a non-NULL window. The new definite 'Null pointer dereference: auc_win' ignores the link between the two conditions. It is a false positive introduced by the PR's new path splitting and condition handling. ---- 152 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/autocmd.c:1323:17: warning:inconclusive: Possible null pointer dereference: auc_win [nullPointer] neovim-0.12.6/src/nvim/autocmd.c:1274:20: note: Assignment 'auc_win=NULL', assigned value is 0 neovim-0.12.6/src/nvim/autocmd.c:1300:16: note: Assuming condition is true neovim-0.12.6/src/nvim/autocmd.c:1323:17: note: Null pointer dereference Explanation: In aucmd_prepbuf(), `auc_win` is initialized to NULL at line 1274. When `win == NULL`, it is set from `aucmd_win[auc_idx].auc_win`, and that entry is allocated with win_alloc_aucmd_win() if it was NULL. The dereference at 1323 is in the `else` branch of `if (win != NULL)`, so it only runs when `win == NULL`, and then `auc_win` is non-NULL. The PR makes the value flow lose the correlation between `win` and `auc_win`: it carries `auc_win=NULL` past the `if (win == NULL)` block into the `win == NULL` branch. The cited 'Assuming condition is true' at line 1300 (`bt_prompt(curbuf)`) has nothing to do with `auc_win`. This new warning is a false positive. ---- 153 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/autocmd.c:1332:38: warning:inconclusive: Possible null pointer dereference: auc_win [nullPointer] neovim-0.12.6/src/nvim/autocmd.c:1274:20: note: Assignment 'auc_win=NULL', assigned value is 0 neovim-0.12.6/src/nvim/autocmd.c:1330:9: note: Assuming condition is true neovim-0.12.6/src/nvim/autocmd.c:1332:38: note: Null pointer dereference Explanation: `auc_win` is initialised to NULL at line 1274. Inside `if (win == NULL)` it is then set to `aucmd_win[auc_idx].auc_win` at line 1294, which `win_alloc_aucmd_win()` allocates if it is still NULL. The dereference at 1332 is in the else branch of `if (win != NULL)`, so it only runs when `win == NULL`, i.e. after the assignment at 1294. The NULL from 1274 cannot reach line 1332. The new path splitting/Partial logic lets the initial NULL leak past the correlated `win == NULL` / `win != NULL` checks, so this new nullPointer warning is a false positive. ---- 154 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/autocmd.c:1333:33: warning:inconclusive: Possible null pointer dereference: auc_win [nullPointer] neovim-0.12.6/src/nvim/autocmd.c:1274:20: note: Assignment 'auc_win=NULL', assigned value is 0 neovim-0.12.6/src/nvim/autocmd.c:1330:9: note: Assuming condition is true neovim-0.12.6/src/nvim/autocmd.c:1333:33: note: Null pointer dereference Explanation: In aucmd_prepbuf, auc_win starts as NULL at line 1274. It is assigned from aucmd_win[auc_idx].auc_win, which is allocated when needed, exactly when win == NULL. The else branch at line 1310 runs only when win == NULL, so auc_win is never NULL there. The new warning comes from a path where the allocation block was skipped (win != NULL) but then the else branch is taken, which cannot happen. The PR loses the correlation between the two 'win == NULL' conditions, so this is a new false positive. ---- 155 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/charset.c:357:15: style: Variable 'buf_e' can be declared as pointer to const [constVariablePointer] Explanation: `buf_e` is only used in pointer comparisons (`buf_p < buf_e`, `buf_p + l > buf_e`, `assert(buf_p <= buf_e)`) and is never written through. It could be declared `const char *const`, so the new constVariablePointer warning is a true positive. It is unclear why the valueflow change exposed it, but the added warning itself is correct. ---- 156 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/getchar.c:2348:31: style: Condition 'max_mlen>mp_match_len' is always false [knownConditionTrueFalse] neovim-0.12.6/src/nvim/getchar.c:2190:18: note: Assignment 'max_mlen=0', assigned value is 0 neovim-0.12.6/src/nvim/getchar.c:2348:31: note: Condition 'max_mlen>mp_match_len' is always false Explanation: `max_mlen` starts at 0 (line 2190), but inside the mapping-search loop it is updated with `max_mlen = MAX(max_mlen, mlen)` at line 2336 whenever an entry does not match. When the loop runs, `max_mlen` can therefore be greater than `mp_match_len`, so `max_mlen > mp_match_len` at line 2348 is not always false. The new forward analysis lost the modification made inside the loop and kept the known value 0. This new knownConditionTrueFalse is a false positive. ---- 157 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/neovim/neovim_0.12.6.orig.tar.xz Result: your neovim-0.12.6/src/nvim/getchar.c:2383:16: style: Condition 'keylen<0' is always true [knownConditionTrueFalse] neovim-0.12.6/src/nvim/getchar.c:2369:16: note: Assuming that condition 'keylen==0' is not redundant neovim-0.12.6/src/nvim/getchar.c:2378:16: note: Assuming condition is false neovim-0.12.6/src/nvim/getchar.c:2383:16: note: Condition 'keylen<0' is always true Explanation: The new warning is a false positive. At line 2369 the `if (keylen == 0)` block only returns when `mp == NULL`. When `mp != NULL` and `keylen == 0`, execution falls through. That happens, for example, when `no_mapping != 0 && allow_keys == 0` sets `keylen = 0` and a mapping was found with `max_mlen > mp_match_len`. Line 2378 then removes only `keylen > 0`, so at line 2383 `keylen` can be 0 and the else branch (`keylen = mp_match_len`) is reachable. Cppcheck treats the `keylen == 0` block as escaping on every path, when it escapes on only one (the partial-termination case this PR changes). It then wrongly concludes that `keylen < 0` is always true. ---- 158 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/nethack/nethack_3.6.7.orig.tar.gz Result: main NetHack-3.6.7/win/Qt/qt_win.cpp:4217:24: style: Condition 'ch_esc' is always false [knownConditionTrueFalse] NetHack-3.6.7/win/Qt/qt_win.cpp:4212:15: note: Assignment 'ch_esc=0', assigned value is 0 NetHack-3.6.7/win/Qt/qt_win.cpp:4217:24: note: Condition 'ch_esc' is always false Explanation: Both versions report the same true positive. The inner `char ch_esc=0;` at line 4212 shadows the outer variable and is never assigned again, so `ch_esc` at line 4217 is always 0. The only difference is an extra note, 'Assuming condition is true', on the enclosing `if (!choice)`. That note is harmless but adds nothing, since ch_esc is 0 whether or not the condition holds. The warning stays correct and its location is unchanged, so this does not matter to users. ---- 159 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/nethack/nethack_3.6.7.orig.tar.gz Result: your NetHack-3.6.7/win/Qt/qt_win.cpp:4217:24: style: Condition 'ch_esc' is always false [knownConditionTrueFalse] NetHack-3.6.7/win/Qt/qt_win.cpp:4212:15: note: Assignment 'ch_esc=0', assigned value is 0 NetHack-3.6.7/win/Qt/qt_win.cpp:4216:7: note: Assuming condition is true NetHack-3.6.7/win/Qt/qt_win.cpp:4217:24: note: Condition 'ch_esc' is always false Explanation: Both main and the PR report the same true positive. The inner `char ch_esc=0;` at line 4212 shadows the outer variable and is never changed before `if (k=='\033' && ch_esc)`, so the condition really is always false. The only difference is an extra note, 'Assuming condition is true', on `if (!choice)`. That comes from the then block now being walked on a fork that assumes the condition. The note is technically correct, since line 4217 is only reached when `!choice` holds, but it adds nothing: ch_esc is 0 either way. Users see the same warning with slightly different path notes. ---- 160 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/nethack/nethack_3.6.7.orig.tar.gz Result: your NetHack-3.6.7/win/Qt4/qt4yndlg.cpp:74:19: warning: Either the condition 'c0' is always true [knownConditionTrueFalse] neverball-master/share/audio.c:82:23: note: Assignment 'n=1', assigned value is 1 neverball-master/share/audio.c:86:17: note: Assuming condition is true neverball-master/share/audio.c:91:14: note: Condition 'n>0' is always true Explanation: `n` starts at 1, but the loop body reassigns it at line 95 (`n = ov_read(...)`), and `ov_read` can return 0 or a negative value. So on later iterations `n > 0` can be false, which is how the loop ends. The removed 'always true' warning was a false positive, and its note 'Assuming condition is true' at line 86 points to unrelated code. The PR's better handling of paths and values changed in the loop removes it. ---- 162 / 291 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ns2/ns2_2.35+dfsg.orig.tar.xz Result: main ns-2.35/diffserv/dsPolicy.cc:899:7: style: Condition '!p' is always true [knownConditionTrueFalse] ns-2.35/diffserv/dsPolicy.cc:866:10: note: Assuming that condition 'p' is not redundant ns-2.35/diffserv/dsPolicy.cc:899:7: note: Condition '!p' is always true Explanation: The `while (p)` loop has no `break`. It only leaves the function early through the `return` in the matching-fid branch. So after the loop `p` must be NULL, and `if (!p)` at line 899 really is always true. The old warning was a true positive (redundant check, style), and the PR removed it. The more complex branch splitting and Partial handling probably makes Cppcheck lose the loop-exit knowledge here. This is a new false negative, not a false positive being fixed. ---- 163 / 291 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/n/ns2/ns2_2.35+dfsg.orig.tar.xz Result: main ns-2.35/diffserv/dsPolicy.cc:979:7: style: Condition '!p' is always true [knownConditionTrueFalse] ns-2.35/diffserv/dsPolicy.cc:938:10: note: Assuming that condition 'p' is not redundant ns-2.35/diffserv/dsPolicy.cc:979:7: note: Condition '!p' is always true Explanation: The loop at line 938 is `while (p)`. Every path inside the `if (p->fid == ...)` block returns, and there is no `break`, so the loop can only end with `p == NULL`. That makes `if (!p)` at line 979 always true. The removed knownConditionTrueFalse warning was therefore a true positive, and losing it is a new false negative. ---- 164 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ns2/ns2_2.35+dfsg.orig.tar.xz Result: main ns-2.35/sctp/sctp.cc:4688:21: style: Condition 'iobj->lookup(...)`, and lookup failures throw. On the other path, `vo == 0` holds at line 6077, so `m` is assigned at line 6085. So whenever line 6115 is reached, `m` is non-null. The new path splitting makes Cppcheck combine 'condition at 6038 true' with 'vo == 0 false' while ignoring that `m` is assigned on that same path. This is a new false positive. ---- 172 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/o/ogre-14/ogre-14_14.6.3+dfsg.orig.tar.xz Result: main OGRECave-ogre-e3ee885/OgreMain/src/OgreCompositorInstance.cpp:988:9: warning:inconclusive: Either the condition 'refTexDef' is redundant or there is possible null pointer dereference: refTexDef. [nullPointerRedundantCheck] OGRECave-ogre-e3ee885/OgreMain/src/OgreCompositorInstance.cpp:981:13: note: Assuming that condition 'refTexDef' is not redundant OGRECave-ogre-e3ee885/OgreMain/src/OgreCompositorInstance.cpp:972:8: note: Assuming condition is true OGRECave-ogre-e3ee885/OgreMain/src/OgreCompositorInstance.cpp:988:9: note: Null pointer dereference Explanation: The PR did not add or remove a warning here. It changed which condition the nullPointerRedundantCheck at line 988 cites: 'refTexDef' at line 981 before, '!refTexDef' at line 972 now. Both are plausible reasons for refTexDef to be null at 988. On a path where the chain search fails, the block at 972 is entered; if the global search also fails, refTexDef stays null and the check at 981 is false. Either way the warning is the same inconclusive one. In the real code it is a false positive, because OgreAssert(refTexDef, ...) on line 986 throws when refTexDef is null; Cppcheck only sees it as an unknown call. Changing the cited condition of the same likely false positive does not matter much to users. ---- 173 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/o/ogre-14/ogre-14_14.6.3+dfsg.orig.tar.xz Result: your OGRECave-ogre-e3ee885/OgreMain/src/OgreCompositorInstance.cpp:988:9: warning:inconclusive: Either the condition '!refTexDef' is redundant or there is possible null pointer dereference: refTexDef. [nullPointerRedundantCheck] OGRECave-ogre-e3ee885/OgreMain/src/OgreCompositorInstance.cpp:972:8: note: Assuming that condition '!refTexDef' is not redundant OGRECave-ogre-e3ee885/OgreMain/src/OgreCompositorInstance.cpp:988:9: note: Null pointer dereference Explanation: The warning at line 988 was already reported by main. Only the condition it cites changed: main cited 'refTexDef' at line 981, the PR cites '!refTexDef' at line 972. Both describe the same path: refTexDef stays null when neither the chain lookup nor the global lookup finds it, and it is then dereferenced at 988. Both are equally plausible explanations. In both versions the warning is inconclusive and most likely a false positive, because OgreAssert(refTexDef, ...) at line 986 throws on null, so 988 is never reached with a null pointer. The new message drops the 'Assuming condition is true' note, which is a minor loss but not a real accuracy change. Overall the effect on users is negligible. ---- 174 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ogre-14/ogre-14_14.6.3+dfsg.orig.tar.xz Result: your OGRECave-ogre-e3ee885/OgreMain/src/OgreShadowCameraSetupPlaneOptimal.cpp:76:20: style: Condition 'incrPrecision' is always false [knownConditionTrueFalse] OGRECave-ogre-e3ee885/OgreMain/src/OgreShadowCameraSetupPlaneOptimal.cpp:60:30: note: Assignment 'incrPrecision=false', assigned value is 0 OGRECave-ogre-e3ee885/OgreMain/src/OgreShadowCameraSetupPlaneOptimal.cpp:62:30: note: Assuming condition is false OGRECave-ogre-e3ee885/OgreMain/src/OgreShadowCameraSetupPlaneOptimal.cpp:76:20: note: Condition 'incrPrecision' is always false Explanation: `incrPrecision` is a local initialised to `false` at line 60 and is never assigned before line 76, so `if(incrPrecision)` inside the allocation loop really is always false. The PR now keeps the known value past the early-return `if` at line 62, whose only branch returns, and into the loop. That adds a true positive, consistent with the same check at line 71. The extra 'Assuming condition is false' note on line 62 is harmless. The code is a deliberate config-style flag, but the warning itself is correct. ---- 175 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: main ophcrack-3.8.0/src/ntproba/aliasPattern.c:91:16: warning: If memory allocation fails, then there is a possible null pointer dereference: patternNumberLarge [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:59: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:38: note: Assignment 'patternNumberLarge=(unsigned int*)malloc(sizeof(unsigned int)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:91:16: note: Null pointer dereference Explanation: patternNumberLarge comes from malloc() at line 53 and is never checked for NULL, so dereferencing it at line 91 is a genuine unchecked-allocation dereference. The nullPointerOutOfMemory warning there is a true positive, and removing it is a new false negative. The impact is small: the PR now reports the same pointer at line 78. Strictly, line 91 is only reached with pointerLarge > 0, which means line 71 already dereferenced the pointer, so this report mostly duplicates the earlier ones. ---- 176 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: main ophcrack-3.8.0/src/ntproba/aliasPattern.c:92:16: warning: If memory allocation fails, then there is a possible null pointer dereference: patternNumberLarge [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:59: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:38: note: Assignment 'patternNumberLarge=(unsigned int*)malloc(sizeof(unsigned int)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:92:16: note: Null pointer dereference Explanation: `patternNumberLarge` comes from an unchecked malloc at line 53, and line 92 dereferences it, so the removed warning points at a real missing NULL check. The dereference at line 92 is redundant, though. The loop at line 90 only runs when `pointerLarge > 0`, and that requires line 71 to have already written through `patternNumberLarge`. With a NULL pointer, the earlier accesses at lines 65/66/70/71 would fault first. The PR loses the null value after the `while` loop at 76–89, which is a small false negative rather than a fixed false positive. The underlying unchecked-malloc bug is still reported at other lines in this function, including the newly added 77/78/79/86 warnings. So users lose little: a true but redundant warning disappeared. ---- 177 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: main ophcrack-3.8.0/src/ntproba/aliasPattern.c:92:54: warning: If memory allocation fails, then there is a possible null pointer dereference: patternNumberLarge [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:59: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:38: note: Assignment 'patternNumberLarge=(unsigned int*)malloc(sizeof(unsigned int)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:92:54: note: Null pointer dereference Explanation: patternNumberLarge comes from an unchecked malloc at line 53 and is dereferenced at line 92, so warning about it when allocation fails is technically a true positive. The PR removed this warning, which makes it a new false negative. The impact is small for two reasons. First, line 92 is only reached when pointerLarge > 0, and then line 71 would already have dereferenced the same pointer. Second, the PR now reports other nullPointerOutOfMemory warnings in the same function (lines 77-86), so the unchecked malloc is still flagged. ---- 178 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: your ophcrack-3.8.0/src/ntproba/aliasPattern.c:77:16: warning: If memory allocation fails, then there is a possible null pointer dereference: patternNumberSmall [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:54:59: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:54:38: note: Assignment 'patternNumberSmall=(unsigned int*)malloc(sizeof(unsigned int)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:77:16: note: Null pointer dereference Explanation: `patternNumberSmall` comes from an unchecked `malloc` (line 54), and line 77 dereferences it as `patternNumberSmall[pointerSmall-1]`. If the allocation fails, that is a null pointer dereference, so the new nullPointerOutOfMemory warning is a true positive about a real defect: the allocations are never checked. The warning partly duplicates earlier dereferences in the first loop (e.g. line 66), so it adds little new information, but it is correct. ---- 179 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: your ophcrack-3.8.0/src/ntproba/aliasPattern.c:77:54: warning: If memory allocation fails, then there is a possible null pointer dereference: small [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:52:39: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:52:22: note: Assignment 'small=(uint64_t*)malloc(sizeof(uint64_t)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:77:54: note: Null pointer dereference Explanation: `small` comes from an unchecked `malloc` at line 52 and is never null-tested before it is read at line 77. If the allocation fails, the read is a genuine null dereference of the same kind main already reports elsewhere in this function, e.g. `patternNumberLarge` at lines 91/92. The PR follows the out-of-memory value further, into the first while loop, so the new warning is a true positive. One caveat: line 77 is only reached after the for loop has already written through `small`, so this partly duplicates an earlier dereference. ---- 180 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: your ophcrack-3.8.0/src/ntproba/aliasPattern.c:78:16: warning: If memory allocation fails, then there is a possible null pointer dereference: patternNumberSmall [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:54:59: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:54:38: note: Assignment 'patternNumberSmall=(unsigned int*)malloc(sizeof(unsigned int)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:78:16: note: Null pointer dereference Explanation: initLookUpTable() mallocs patternNumberSmall at line 54 and never checks it for NULL. Line 78 then dereferences it inside the while loop (patternNumberSmall[pointerSmall-1]). If the allocation fails, that is a real null pointer dereference, which is exactly what nullPointerOutOfMemory is meant to catch. Cppcheck normally reports every unchecked use of the failed allocation, so this warning matches its usual behaviour. The PR lets the null value reach the loop body after the earlier if/else, so the added warning is a true positive. An earlier write at line 66 would crash first, which makes this warning somewhat redundant but not wrong. ---- 181 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: your ophcrack-3.8.0/src/ntproba/aliasPattern.c:78:54: warning: If memory allocation fails, then there is a possible null pointer dereference: patternNumberLarge [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:59: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:53:38: note: Assignment 'patternNumberLarge=(unsigned int*)malloc(sizeof(unsigned int)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:78:54: note: Null pointer dereference Explanation: `patternNumberLarge` comes from `malloc` at line 53 and is never checked for NULL before use. Line 78 reads `patternNumberLarge[pointerLarge-1]`, so if the allocation fails this is a real null dereference. That makes the new nullPointerOutOfMemory warning a true positive for this unchecked allocation. Strictly, any path that reaches line 78 has already written through the pointer at line 71, so this is not the first faulting dereference; that write is not reported by either version. The pull request moves this pointer's reports from the second loop (lines 91–92, removed) into the first while loop. It also adds similar warnings for the other three unchecked mallocs (`small`, `large`, `patternNumberSmall`). All of these describe genuine missing malloc checks. ---- 182 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: your ophcrack-3.8.0/src/ntproba/aliasPattern.c:79:12: warning: If memory allocation fails, then there is a possible null pointer dereference: large [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:51:39: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:51:22: note: Assignment 'large=(uint64_t*)malloc(sizeof(uint64_t)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:79:12: note: Null pointer dereference Explanation: `large` comes from `malloc()` at line 51 and is never checked for NULL before `large[pointerLarge-1]` is read at line 79. If the allocation fails, that read is a null pointer dereference, so the new nullPointerOutOfMemory warning points at a real defect: the missing out-of-memory check. Strictly, the first write to `large` in the loop at line 70 would fault earlier. Even so, the warning at line 79 still describes a real unchecked dereference of the allocation, so it is a true positive gained from the better path tracking. ---- 183 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: your ophcrack-3.8.0/src/ntproba/aliasPattern.c:79:34: warning: If memory allocation fails, then there is a possible null pointer dereference: small [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:52:39: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:52:22: note: Assignment 'small=(uint64_t*)malloc(sizeof(uint64_t)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:79:34: note: Null pointer dereference Explanation: `small` is allocated with `malloc` at line 52 and never checked for NULL. Line 79 reads `small[pointerSmall-1]`, so if the allocation fails this is a genuine possible null dereference, which is exactly what `nullPointerOutOfMemory` reports. The new warning is a true positive. The PR's better path handling now lets the value reach the second loop. The warning overlaps with earlier unchecked uses of `small` in the same function (e.g. line 65), so it adds little, but it is still correct. ---- 184 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: your ophcrack-3.8.0/src/ntproba/aliasPattern.c:86:7: warning: If memory allocation fails, then there is a possible null pointer dereference: large [nullPointerOutOfMemory] ophcrack-3.8.0/src/ntproba/aliasPattern.c:51:39: note: Assuming allocation function fails ophcrack-3.8.0/src/ntproba/aliasPattern.c:51:22: note: Assignment 'large=(uint64_t*)malloc(sizeof(uint64_t)*array->size)', assigned value is 0 ophcrack-3.8.0/src/ntproba/aliasPattern.c:86:7: note: Null pointer dereference Explanation: `large` comes from `malloc` on line 51 and is never checked for NULL before line 86 writes `large[pointerLarge-1]`. If the allocation fails, that write dereferences a null pointer. The code has no null check on any path, so the warning is a genuine nullPointerOutOfMemory finding, consistent with the warnings already reported for these buffers. Line 70 would likely crash first on the same path. Still, line 86 is a real unchecked dereference of the allocation result, so reporting it is a true positive rather than a false positive. ---- 185 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/pcc/pcc_1.2.0~DEVEL+20220331.orig.tar.gz Result: your pcc-20220331/mip/match.c:646:2: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] pcc-20220331/mip/match.c:638:9: note: Assuming that condition 'sh==-1' is not redundant pcc-20220331/mip/match.c:646:2: note: Shifting a negative value is technically undefined behaviour Explanation: Inside `if (sh == -1)`, both the then and the else branch assign `sh` (`sh = 0` or `sh = ffs(...)-1`). So the value -1 assumed from the condition cannot reach line 646 unchanged. If the condition is false, `sh` is not -1 anyway. The warning's note says the -1 comes from the 'sh==-1' condition, not from knowledge that ffs() can return 0. The new forward-analysis/Partial handling therefore lets the condition value leak past an if/else that modifies the variable on every path. This is the 'both blocks change a' pattern that the PR's own tests expect to give no warning, so it is a new false positive. ---- 186 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pcc/pcc_1.2.0~DEVEL+20220331.orig.tar.gz Result: your pcc-20220331/mip/match.c:877:2: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] pcc-20220331/mip/match.c:868:9: note: Assuming that condition 'sh==-1' is not redundant pcc-20220331/mip/match.c:877:2: note: Shifting a negative value is technically undefined behaviour Explanation: At line 868 the code tests `if (sh == -1)`, and both branches inside it reassign `sh` (to 0, or to `ffs(...)-1`). So the value -1 from the condition cannot reach `SCLASS(p->n_su, sh)` at line 877. On the else path `sh != -1`, and on the then path `sh` is overwritten. The new warning says 'Assuming that condition sh==-1 is not redundant', which means it thinks the -1 survives the if. That is wrong. It looks like the new Partial-terminate handling of the inner if/else causes the then block not to count as a change block, so the value from the condition leaks past it. `ffs()` returning 0 could in theory give -1, but that is not what Cppcheck reasons about here. This is a new false positive. ---- 187 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/pgagroal/pgagroal_2.1.0.orig.tar.gz Result: your pgagroal-2.1.0/src/libpgagroal/utils.c:123:19: warning: If memory allocation fails, then there is a possible null pointer dereference: array [nullPointerOutOfMemory] pgagroal-2.1.0/src/libpgagroal/utils.c:101:26: note: Assuming allocation function fails pgagroal-2.1.0/src/libpgagroal/utils.c:101:12: note: Assignment 'array=(char**)malloc(sizeof(char*)*counter)', assigned value is 0 pgagroal-2.1.0/src/libpgagroal/utils.c:123:19: note: Null pointer dereference Explanation: `array` comes from `malloc()` at line 101 and is never checked for NULL. Line 123 reads `array[i]`, so the code would dereference NULL if the allocation failed. The new nullPointerOutOfMemory warning is therefore technically correct. It appears now because the PR keeps the malloc value alive through the intervening loop, which does not reassign `array`. One caveat: any path that reaches line 123 with `counter > 0` has already written `array[counter]` at line 113. So this is a second report of the same unchecked allocation rather than a new bug, but it is still a true positive. ---- 188 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pgpool2/pgpool2_4.7.3.orig.tar.gz Result: your gram.y:17607:25: warning: Uninitialized variable: n [uninitvar] gram.y:17589:43: note: Assuming condition is false gram.y:17594:46: note: Assuming condition is true gram.y:17607:25: note: Uninitialized variable: n Explanation: `n` is assigned in the `public` branch and in the `else` branch. The `none` branch calls `ereport(ERROR, ...)`, which never returns in PostgreSQL/pgpool. So `$$ = n` is never reached with `n` uninitialized. Main treated the unknown `ereport` call as a possible escape and stayed quiet. With the new path splitting in the PR, the path through the `ereport` branch now reaches line 17607 and is reported. That is a new false positive. ---- 189 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pgpool2/pgpool2_4.7.3.orig.tar.gz Result: your gram_minimal.y:17637:25: warning: Uninitialized variable: n [uninitvar] gram_minimal.y:17619:43: note: Assuming condition is false gram_minimal.y:17624:46: note: Assuming condition is true gram_minimal.y:17637:25: note: Uninitialized variable: n Explanation: The warning follows the 'none' branch, which only calls ereport(ERROR, ...). In PostgreSQL/pgpool this call never returns, so 'n' is assigned on every path that reaches '$$ = n;'. Main did not report this: an unknown call at the end of a block is treated as possibly noreturn. The PR's new path splitting now carries the ereport path past the if as if it returned. That makes this a new false positive. ---- 190 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: main ploticus-2.42/src/grgd.c:456:9: error: Uninitialized variable: x [legacyUninitvar] Explanation: Line 456 reads `x` after the if/else. When `Gvertchar` is false, the else branch never assigns `x`, so the read is a real uninitialized-variable use. The removed legacyUninitvar error is replaced by an uninitvar warning at the same line, for the same variable, with an error path. This is the same true positive, now found by the ValueFlow-based check. It gains an error path but drops from error to warning severity, and the path lists some irrelevant conditions. On balance the change makes no real difference to users. ---- 191 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: main ploticus-2.42/src/grgd.c:457:9: error: Uninitialized variable: y [legacyUninitvar] Explanation: In this function `y` is assigned only at line 445, in the non-vertical, large-text branch. When `Gvertchar` is true, `Goldy = y` at line 457 reads an uninitialized `y`, so this is a real bug. The PR does not lose the finding: the legacy checker's `error` line is replaced by a ValueFlow-based `uninitvar` warning at the same location. The new warning carries a valid path: line 419 true, then neither vertical branch assigns `y`. The finding is still reported, and now comes with a path that explains it, so the change is mildly positive. The drop from error to warning severity is just the normal severity of the ValueFlow checker. ---- 192 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: main ploticus-2.42/src/grgd.c:526:9: error: Uninitialized variable: x [legacyUninitvar] Explanation: In the shown code, `x` (and `y`) is only assigned in the `if (GFTfont[0] == '\0')` blocks. When `Gtextsize >= MINTEXTSIZE` and `GFTfont[0]` is non-empty (the FreeType path), `x` is never set before `Goldx = x;` at line 526. So both versions report a real issue. Main reported it through the legacy uninit checker as an unexplained `error`. The PR's value flow now tracks the path through the branches correctly and reports `uninitvar` as a `warning`, with the conditions that lead there. This is the same true positive with a more accurate severity and a useful error path. ---- 193 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: main ploticus-2.42/src/grgd.c:527:9: error: Uninitialized variable: y [legacyUninitvar] Explanation: In this function `y` is only assigned in the `GFTfont[0] == '\0'` sub-branches. On the `Gtextsize < MINTEXTSIZE` paths, and on the vertical path where `GFTfont[0]` is non-empty, `Goldy = y;` at line 527 reads an uninitialized `y`. So this is a real bug. The PR does not drop the finding. The legacyUninitvar error is replaced by a ValueFlow-based uninitvar warning at the same location. The new warning comes with a concrete path (473 true, 474 false, 492 false) that is feasible when GDFREETYPE is not defined. The report is the same true positive, now with a more informative and accurate message. ---- 194 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: main ploticus-2.42/src/grgd.c:593:9: error: Uninitialized variable: x [legacyUninitvar] Explanation: `x` is only assigned when `Gtextsize >= MINTEXTSIZE` and `GFTfont[0] == '\0'`. On other paths, such as a small text size or a FreeType font, `Goldx = x;` at line 593 reads an uninitialized variable, so the finding is a true positive. Main reported it from the legacy checker as an error with no path. With the PR, the ValueFlow-based uninitvar checker reports it instead: a warning with a concrete path (542 true, 543 false, 560 false). That path is a real way to reach the read, so the message is more precise and easier to act on. The true positive is kept, not lost. ---- 195 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: main ploticus-2.42/src/grgd.c:594:9: error: Uninitialized variable: y [legacyUninitvar] Explanation: `y` is assigned only in the `GFTfont[0] == '\0'` blocks. When `Gtextsize < MINTEXTSIZE`, or when a FreeType font is set, `y` is still uninitialized at `Goldy = y;`, so the warning is a true positive. The PR does not lose it: the legacy check's `legacyUninitvar` is replaced by the ValueFlow-based `uninitvar` at the same line. The new report carries a concrete path (542 true, 560 false: the font is non-empty), and that path is valid. Same finding, more informative message. ---- 196 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: main ploticus-2.42/src/proc_annotate.c:227:10: error: Uninitialized variable: atx [legacyUninitvar] Explanation: In calc_arrow, the path the warning needs is ahx outside [ulx, ulx+boxw], ahy inside the box's vertical span, and then neither 'ahx < ulx' nor 'ahx > ulx+boxw' true. Except for NaN that cannot happen: if ahx is outside the range it is either below ulx or above ulx+boxw, so atx is always assigned. The warning is therefore a false positive. The PR does not remove it. The legacyUninitvar error is replaced by an uninitvar warning at the same line, with the same text plus a path. The false positive persists with slightly different id and severity, so the change hardly matters to users. ---- 197 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: your ploticus-2.42/src/grgd.c:456:9: warning: Uninitialized variable: x [uninitvar] ploticus-2.42/src/grgd.c:419:5: note: Assuming condition is false ploticus-2.42/src/grgd.c:439:16: note: Assuming condition is false ploticus-2.42/src/grgd.c:453:18: note: Assuming condition is false ploticus-2.42/src/grgd.c:456:9: note: Uninitialized variable: x Explanation: In PLGG_text, `x` is assigned only in the `if (Gvertchar)` branch. When `Gvertchar` is false, the else branch never writes `x`, so `Goldx = x;` at line 456 reads an uninitialized variable. That makes this a true positive. Before the PR, only the legacy uninitvar checker reported it. Now the ValueFlow-based uninitvar check catches it and gives a path (condition at 419 false). It is also reported as a warning, which fits because the bug depends on that condition. The finding is kept and the message is more informative. The path also lists the conditions at lines 439 and 453, which do not matter for `x` but are harmless. ---- 198 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: your ploticus-2.42/src/grgd.c:457:9: warning: Uninitialized variable: y [uninitvar] ploticus-2.42/src/grgd.c:419:5: note: Assuming condition is true ploticus-2.42/src/grgd.c:420:16: note: Assuming condition is false ploticus-2.42/src/grgd.c:435:18: note: Assuming condition is false ploticus-2.42/src/grgd.c:457:9: note: Uninitialized variable: y Explanation: In PLGG_text, `y` is assigned only in the non-vertical else branch (line 445, and only when Gtextsize >= MINTEXTSIZE). When Gvertchar is true, no path assigns `y`, so `Goldy = y;` at line 457 reads an uninitialized variable. This is a real bug. Before the PR it was found only by the legacy checker (legacyUninitvar, no path). With the PR, the ValueFlow-based uninitvar check now follows the uninitialized value through the branches and reports it with a valid path (Gvertchar true, Gtextsize not small, font set). The true positive is kept, and the new message is backed by better analysis and comes with an execution path. The drop from error to warning severity is a small trade-off, but the finding is still reported correctly. ---- 199 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: your ploticus-2.42/src/grgd.c:526:9: warning: Uninitialized variable: x [uninitvar] ploticus-2.42/src/grgd.c:473:5: note: Assuming condition is true ploticus-2.42/src/grgd.c:474:16: note: Assuming condition is false ploticus-2.42/src/grgd.c:492:18: note: Assuming condition is false ploticus-2.42/src/grgd.c:526:9: note: Uninitialized variable: x Explanation: Inside the `if (Gvertchar)` block, when `Gtextsize >= MINTEXTSIZE` and `GFTfont[0] != '\0'`, nothing assigns `x`; the FreeType block (if compiled in) only sets `a`/`b`. `Goldx = x;` at line 526 then reads an uninitialized local, so this is a real bug. Main reported it through the legacy checker with no explanation. The PR reports the same true positive through the ValueFlow-based uninitvar check, with a concrete path (473 true, 474 false, 492 false). That makes the report easier to act on, at the cost of only a severity label change. ---- 200 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: your ploticus-2.42/src/grgd.c:527:9: warning: Uninitialized variable: y [uninitvar] ploticus-2.42/src/grgd.c:473:5: note: Assuming condition is true ploticus-2.42/src/grgd.c:474:16: note: Assuming condition is false ploticus-2.42/src/grgd.c:492:18: note: Assuming condition is false ploticus-2.42/src/grgd.c:527:9: note: Uninitialized variable: y Explanation: In this function, `y` is assigned only in the branches where `GFTfont[0] == '\0'`. When `Gvertchar` is true and `Gtextsize >= MINTEXTSIZE` with a non-empty `GFTfont`, line 527 `Goldy = y;` reads an uninitialized `y`. The path given in the notes (473 true, 474 false, 492 false) is real; the `Gtextsize < MINTEXTSIZE` branch also never sets `y`. So the warning is a true positive, and it is the same finding as before. The PR moved it from the legacy checker (error, no path) to the ValueFlow-based uninitvar check, which gives a concrete path. The 'warning' severity fits better, since the problem happens only on some paths. The message is more informative and more accurate, with no loss of the finding. ---- 201 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: your ploticus-2.42/src/grgd.c:593:9: warning: Uninitialized variable: x [uninitvar] ploticus-2.42/src/grgd.c:542:5: note: Assuming condition is true ploticus-2.42/src/grgd.c:543:16: note: Assuming condition is false ploticus-2.42/src/grgd.c:560:18: note: Assuming condition is false ploticus-2.42/src/grgd.c:593:9: note: Uninitialized variable: x Explanation: Both versions flag the same real bug at line 593, so this is a true positive either way. In the vertical-text branch (line 542 true), `x` is assigned only when `GFTfont[0] == '\0'` (line 561). If `Gtextsize < MINTEXTSIZE`, or the FreeType font is non-empty, `x` stays uninitialized and is then read by `Goldx = x;`. Main reported it through the legacy checker as a pathless `legacyUninitvar` error. With the PR, the value-flow based `uninitvar` check now follows the paths through the nested ifs and reports the same issue with the conditions that lead to it. The `warning` severity also fits better, since the bug only happens on some paths. The message is more accurate and easier to act on. ---- 202 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: your ploticus-2.42/src/grgd.c:594:9: warning: Uninitialized variable: y [uninitvar] ploticus-2.42/src/grgd.c:542:5: note: Assuming condition is true ploticus-2.42/src/grgd.c:560:18: note: Assuming condition is false ploticus-2.42/src/grgd.c:594:9: note: Uninitialized variable: y Explanation: Line 594 reads `y` while it may still be uninitialized. `y` is only assigned at line 562 or line 587, inside `if( GFTfont[0] == '\0' )`, and only in the non-small-text branches. When the text size is below `MINTEXTSIZE`, or when a FreeType font is set, `Goldy = y` reads an uninitialized variable. So this is a true positive both before and after the PR. Main reported it only through the legacy checker (`legacyUninitvar`). With the PR, the ValueFlow-based `uninitvar` check catches it and gives a valid path: 542 true, 560 false. The 543 step is implied because line 560 sits in its else block. The warning severity also fits a path-dependent read better than error. Same finding, better understood and better explained. ---- 203 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/ploticus/ploticus_2.42.orig.tar.gz Result: your ploticus-2.42/src/proc_annotate.c:227:10: warning: Uninitialized variable: atx [uninitvar] ploticus-2.42/src/proc_annotate.c:196:16: note: Assuming condition is false ploticus-2.42/src/proc_annotate.c:203:26: note: Assuming condition is true ploticus-2.42/src/proc_annotate.c:205:10: note: Assuming condition is false ploticus-2.42/src/proc_annotate.c:206:15: note: Assuming condition is false ploticus-2.42/src/proc_annotate.c:227:10: note: Uninitialized variable: atx Explanation: Main already flagged atx at line 227 as a legacyUninitvar error. The PR replaces that with a valueflow-based uninitvar warning at the same location. The reported path is: 196 false, then 203 true, then 205 false (ahx >= ulx), then 206 false (ahx <= ulx+boxw). With ordinary numbers this path is infeasible: if 196 is false and ahx >= ulx, then ahx > ulx+boxw and line 206 would assign atx. Only a NaN ahx (with ahy in range) reaches line 227 uninitialized, which is a technically possible but unusual case. So the finding has the same questionable validity before and after. Users see the same line flagged, now as a warning with a path rather than an error. The net effect is roughly neutral. ---- 204 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plus42/plus42_1.5.4+ds.orig.tar.xz Result: main plus42-upstream-1.5.4/common/core_helpers.cc:1185:23: style: Condition 'wsize<64' is always true [knownConditionTrueFalse] plus42-upstream-1.5.4/common/core_helpers.cc:1170:32: note: Calling function 'effective_wsize' returns !>=54 plus42-upstream-1.5.4/common/core_helpers.cc:1171:16: note: Assuming condition is true plus42-upstream-1.5.4/common/core_helpers.cc:1175:15: note: Assuming condition is true plus42-upstream-1.5.4/common/core_helpers.cc:1185:23: note: Condition 'wsize<64' is always true Explanation: The same knownConditionTrueFalse warning is reported by both versions; only its error path changed. Without BCD_MATH, effective_wsize() returns at most 53, so 'wsize < 64' is always true and the warning stands. Main's path included the step 'Assuming condition is true' at line 1175 ('if (r < 0)'). That condition has nothing to do with wsize, and the branch it guards only changes r, so the step was misleading. The PR's path keeps only the relevant steps: the return value of effective_wsize() and the base_wrap branch being taken. The message is slightly more accurate. ---- 205 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plus42/plus42_1.5.4+ds.orig.tar.xz Result: your plus42-upstream-1.5.4/common/core_helpers.cc:1185:23: style: Condition 'wsize<64' is always true [knownConditionTrueFalse] plus42-upstream-1.5.4/common/core_helpers.cc:1170:32: note: Calling function 'effective_wsize' returns !>=54 plus42-upstream-1.5.4/common/core_helpers.cc:1171:16: note: Assuming condition is true plus42-upstream-1.5.4/common/core_helpers.cc:1185:23: note: Condition 'wsize<64' is always true Explanation: The warning itself is unchanged. In the non-BCD_MATH configuration, effective_wsize() returns at most 53, so 'wsize < 64' is always true there. Only the error path differs. Main included an 'Assuming condition is true' note for 'if (r < 0)' at line 1175. That condition has nothing to do with wsize, and the paths with and without 'r += d' reach line 1185 with the same wsize. The PR drops this irrelevant assumption from the trace, so the explanation is shorter and more accurate. ---- 206 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plus42/plus42_1.5.4+ds.orig.tar.xz Result: your plus42-upstream-1.5.4/common/core_helpers.cc:1569:29: warning: If memory allocation fails, then there is a possible null pointer dereference: line_start [nullPointerOutOfMemory] plus42-upstream-1.5.4/common/core_helpers.cc:1549:37: note: Assuming allocation function fails plus42-upstream-1.5.4/common/core_helpers.cc:1549:23: note: Assignment 'line_start=(int*)malloc(disp_r*sizeof(int))', assigned value is 0 plus42-upstream-1.5.4/common/core_helpers.cc:1569:29: note: Null pointer dereference Explanation: `line_start` comes from an unchecked `malloc(disp_r * sizeof(int))`. The pointer itself is never reassigned: the loop only writes through it. So if the allocation fails, it is still null at line 1569, where `line_start[line]` is read. The PR now carries the null value past the loop with `break`s instead of losing it, so the new warning reflects real missing error handling. The same unchecked pointer is already dereferenced earlier (line 1555), so the new warning is somewhat redundant. It is still a correct diagnostic and consistent with how Cppcheck reports each dereference of a possibly-null pointer. ---- 207 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plus42/plus42_1.5.4+ds.orig.tar.xz Result: your plus42-upstream-1.5.4/common/core_helpers.cc:1569:5: warning: If memory allocation fails, then there is a possible null pointer dereference: line_length [nullPointerOutOfMemory] plus42-upstream-1.5.4/common/core_helpers.cc:1550:38: note: Assuming allocation function fails plus42-upstream-1.5.4/common/core_helpers.cc:1550:24: note: Assignment 'line_length=(int*)malloc(disp_r*sizeof(int))', assigned value is 0 plus42-upstream-1.5.4/common/core_helpers.cc:1569:5: note: Null pointer dereference Explanation: `line_length` comes from an unchecked `malloc()` at line 1550. Line 1569 (`line_length[line] = ...`) runs on every path after the loop, and nothing in between assigns or checks the pointer. If that allocation fails, line 1569 dereferences a null pointer, so the nullPointerOutOfMemory warning is a true positive. Main probably lost the value while walking the loop with its undecided ifs and `break`s. The PR now carries the paths past the loop, so this is a newly found true positive. ---- 208 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plus42/plus42_1.5.4+ds.orig.tar.xz Result: your plus42-upstream-1.5.4/common/core_helpers.cc:1571:32: warning: If memory allocation fails, then there is a possible null pointer dereference: line_start [nullPointerOutOfMemory] plus42-upstream-1.5.4/common/core_helpers.cc:1549:37: note: Assuming allocation function fails plus42-upstream-1.5.4/common/core_helpers.cc:1549:23: note: Assignment 'line_start=(int*)malloc(disp_r*sizeof(int))', assigned value is 0 plus42-upstream-1.5.4/common/core_helpers.cc:1571:32: note: Null pointer dereference Explanation: `line_start` comes from an unchecked `malloc` and the pointer itself is never reassigned. The loop only writes its elements, so if the allocation fails the pointer is still null at line 1571 and `line_start[i]` dereferences null. The warning matches Cppcheck's usual per-dereference behaviour for `nullPointerOutOfMemory`. Main apparently dropped the value at the loop with `break`s; the PR keeps it through the loop, which is correct. It overlaps with the earlier dereference at line 1555, but the missing null check is a real bug, so this is a valid true positive. ---- 209 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plus42/plus42_1.5.4+ds.orig.tar.xz Result: your plus42-upstream-1.5.4/common/core_helpers.cc:1571:47: warning: If memory allocation fails, then there is a possible null pointer dereference: line_length [nullPointerOutOfMemory] plus42-upstream-1.5.4/common/core_helpers.cc:1550:38: note: Assuming allocation function fails plus42-upstream-1.5.4/common/core_helpers.cc:1550:24: note: Assignment 'line_length=(int*)malloc(disp_r*sizeof(int))', assigned value is 0 plus42-upstream-1.5.4/common/core_helpers.cc:1571:47: note: Null pointer dereference Explanation: `line_length` comes from `malloc` and is never checked for NULL. It is then dereferenced unconditionally at 1569 and in the loop at 1571. If the allocation fails, `line_length[i]` at 1571 dereferences a null pointer, so the new nullPointerOutOfMemory warning is a true positive for this check. It is somewhat redundant with the warning at 1569, which is also new. Main probably lost the null value when the `for` loop with `break` statements cut off the path. The PR's per-path tracking carries the value past the loop, so it now reports the real unchecked-malloc dereferences. ---- 210 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/polylib/polylib_6.01+dfsg.orig.tar.xz Result: main polylib-6.01/source/kernel/param.c:56:7: warning: If memory allocation fails, then there is a possible null pointer dereference: param_name [nullPointerOutOfMemory] polylib-6.01/source/kernel/param.c:26:22: note: Assuming allocation function fails polylib-6.01/source/kernel/param.c:26:22: note: Assignment 'param_name=malloc(m*sizeof(char*))', assigned value is 0 polylib-6.01/source/kernel/param.c:56:7: note: Null pointer dereference Explanation: Line 26 assigns `param_name = malloc(...)` with no NULL check. On the path where `f` is false (no input, or every line was a comment), the loop at lines 55-58 writes `param_name[i]` for `i` from 0 to m-1. If the allocation failed, that writes through a NULL pointer. The removed nullPointerOutOfMemory warning at line 56 was therefore a true positive. The PR's new path merging around the `if (f)` block with its loops drops it, which is a new false negative. ---- 211 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/polylib/polylib_6.01+dfsg.orig.tar.xz Result: main polylib-6.01/source/kernel/param.c:57:16: warning: If memory allocation fails, then there is a possible null pointer dereference: param_name [nullPointerOutOfMemory] polylib-6.01/source/kernel/param.c:26:22: note: Assuming allocation function fails polylib-6.01/source/kernel/param.c:26:22: note: Assignment 'param_name=malloc(m*sizeof(char*))', assigned value is 0 polylib-6.01/source/kernel/param.c:57:16: note: Null pointer dereference Explanation: `param_name = malloc(...)` at line 26 is never checked for NULL. When `f` is false (no input), the if-block is skipped and lines 56/57 index `param_name[i]` directly, so a failed allocation leads to a NULL dereference. The nullPointerOutOfMemory warning at line 57 is therefore a true positive. The PR's new path-splitting/Partial handling dropped the value after the `if (f)` block, so this removal is a new false negative. ---- 212 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/polylib/polylib_6.01+dfsg.orig.tar.xz Result: main polylib-6.01/source/kernel/polyhedron.c:2727:9: style: Condition 'SatTranspose' is always false [knownConditionTrueFalse] polylib-6.01/source/kernel/polyhedron.c:2712:42: note: Assignment 'SatTranspose=NULL', assigned value is 0 polylib-6.01/source/kernel/polyhedron.c:2727:9: note: Condition 'SatTranspose' is always false Explanation: The check `if (SatTranspose)` is inside the CATCH handler, a setjmp/longjmp construct. That handler runs when an exception is raised from the TRY block, and by then SatTranspose may already hold an allocated SatMatrix. The NULL from the declaration is not the only value it can have there, so 'Condition SatTranspose is always false' is a false positive caused by Cppcheck not modelling the longjmp re-entry. The same pattern for NewPol, Mat, Ray and Sat is not reported, which supports this. The PR makes values that are not known on every path become possible instead of known, so removing the warning is an improvement. ---- 213 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/ppp/ppp_2.5.5.orig.tar.xz Result: your ppp-2.5.5/pppstats/pppstats.c:409:6: style: Condition '!signalled' is always true [knownConditionTrueFalse] ppp-2.5.5/pppstats/pppstats.c:287:14: note: Assignment 'signalled=0', assigned value is 0 ppp-2.5.5/pppstats/pppstats.c:320:6: note: Assuming condition is true ppp-2.5.5/pppstats/pppstats.c:403:16: note: Assuming condition is false ppp-2.5.5/pppstats/pppstats.c:409:6: note: Condition '!signalled' is always true Explanation: `signalled` is a global flag that the SIGALRM handler sets asynchronously. That is the whole point of checking it after blocking SIGALRM and before `sigsuspend`. It is reset to 0 at 287 and 414, but the alarm armed with `alarm(interval)` can fire before line 409, so `!signalled` is not always true. The new knownConditionTrueFalse is a false positive. The PR's path-splitting changes now keep the value 0 as known through the loop body and its calls. ---- 214 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/presage/presage_0.9.1.orig.tar.gz Result: main presage-0.9.1/apps/gtk/gprompter/scintilla/lexers/LexPython.cxx:135:24: style: Condition 'startPos==0' is always false [knownConditionTrueFalse] presage-0.9.1/apps/gtk/gprompter/scintilla/lexers/LexPython.cxx:118:15: note: Assuming that condition 'startPos>0' is not redundant presage-0.9.1/apps/gtk/gprompter/scintilla/lexers/LexPython.cxx:135:24: note: Condition 'startPos==0' is always false Explanation: Inside `if (startPos > 0)`, the nested `if (lineCurrent > 0)` block reassigns `startPos = styler.LineStart(lineCurrent)`, which can return 0 (for example when lineCurrent reaches 0 in the backtracking loop). So `startPos == 0` at line 135 can be true and is not always false. Main reported a false positive by keeping the outer assumption `startPos > 0` across a block that changes the value. The PR handles paths that change the value better, and removing this false knownConditionTrueFalse is an improvement. ---- 215 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pupnp-1.8/pupnp-1.8_1.8.4.orig.tar.xz Result: main pupnp-1.8-1.8.4/ixml/src/ixmlparser.c:354:38: style: Condition 'num!=0' is always true [knownConditionTrueFalse] pupnp-1.8-1.8.4/ixml/src/ixmlparser.c:347:15: note: Assignment 'num=1', assigned value is 1 pupnp-1.8-1.8.4/ixml/src/ixmlparser.c:354:38: note: Condition 'num!=0' is always true Explanation: 'num' starts at 1, but the loop body changes it: 'num++' on '<' and 'num--' on '>'. On later iterations 'num' can be 0, and that is how the loop normally ends. So 'num != 0' is not always true in the loop condition, and main's warning was a false positive. The PR changes how changes to the value inside branches are tracked, so the value is no longer treated as known at the loop condition. Removing this false positive is an improvement. ---- 216 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/python-yenc/python-yenc_0.4.0.orig.tar.gz Result: main yenc-0.4.0/src/_yenc.c:267:3: warning: If memory allocation fails, then there is a possible null pointer dereference: output_buffer [nullPointerOutOfMemory] yenc-0.4.0/src/_yenc.c:406:32: note: Assuming allocation function fails yenc-0.4.0/src/_yenc.c:406:18: note: Assignment 'output_buffer=(unsigned char*)malloc(input_len)', assigned value is 0 yenc-0.4.0/src/_yenc.c:407:43: note: Calling function 'decode_buffer', 2nd argument 'output_buffer' value is 0 yenc-0.4.0/src/_yenc.c:256:6: note: Assuming condition is true yenc-0.4.0/src/_yenc.c:267:3: note: Null pointer dereference Explanation: The same nullPointerOutOfMemory warning at line 267 is reported by both versions. The caller passes an unchecked malloc result into decode_buffer, so the warning stays a true positive. Only the error-path notes changed. Main reaches the dereference through the '*escape' branch (line 256 true). The PR reaches it through the final else branch (lines 259 and 262 false). Both are real paths to the write, so neither message is more or less accurate. The difference does not matter to users. ---- 217 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/python-yenc/python-yenc_0.4.0.orig.tar.gz Result: your yenc-0.4.0/src/_yenc.c:267:3: warning: If memory allocation fails, then there is a possible null pointer dereference: output_buffer [nullPointerOutOfMemory] yenc-0.4.0/src/_yenc.c:406:32: note: Assuming allocation function fails yenc-0.4.0/src/_yenc.c:406:18: note: Assignment 'output_buffer=(unsigned char*)malloc(input_len)', assigned value is 0 yenc-0.4.0/src/_yenc.c:407:43: note: Calling function 'decode_buffer', 2nd argument 'output_buffer' value is 0 yenc-0.4.0/src/_yenc.c:259:18: note: Assuming condition is false yenc-0.4.0/src/_yenc.c:262:24: note: Assuming condition is false yenc-0.4.0/src/_yenc.c:267:3: note: Null pointer dereference Explanation: Both versions report the same nullPointerOutOfMemory at line 267. The unchecked malloc at line 406 is passed to decode_buffer, which writes through output_buffer, so the warning is a true positive. Only the error-path notes changed. Main went through the '*escape' branch (line 256 true); the PR goes through the final else branch (lines 259 and 262 false). Both are valid paths that reach the dereference, so the message is about as accurate as before. ---- 218 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qwebdavlib/qwebdavlib_1.0.0.orig.tar.gz Result: main qwebdavlib-1.0.0/qwebdavlib/qwebdavdirparser.cpp:341:13: style: Condition 'm_abort' is always false [knownConditionTrueFalse] qwebdavlib-1.0.0/qwebdavlib/qwebdavdirparser.cpp:316:13: note: Assuming that condition 'm_abort' is not redundant qwebdavlib-1.0.0/qwebdavlib/qwebdavdirparser.cpp:321:31: note: Assuming condition is false qwebdavlib-1.0.0/qwebdavlib/qwebdavdirparser.cpp:325:32: note: Assuming condition is false qwebdavlib-1.0.0/qwebdavlib/qwebdavdirparser.cpp:331:38: note: Assuming condition is false qwebdavlib-1.0.0/qwebdavlib/qwebdavdirparser.cpp:341:13: note: Condition 'm_abort' is always false Explanation: The loop body returns at line 316 if m_abort is set. Between there and line 341, nothing visibly writes m_abort: there are only `continue` statements, const-looking calls on other objects (`m_webdav->rootPath()`, `QUrl`, `QDomElement`) and local computations. So in single-threaded semantics m_abort is false at line 341, and the second check is redundant. The removed warning was therefore a true positive. Losing it is most likely a side effect of the PR's new path and Partial termination handling around the `continue` branches. That makes it a new false negative, not a removed false positive. The only caveat is that m_abort could be set asynchronously, which the code does not show. ---- 219 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-bioc-rhtslib/r-bioc-rhtslib_3.8.0+dfsg.orig.tar.xz Result: main Rhtslib/src/htslib-1.18/kstring.c:395:24: style: Variable 'bmGs' can be declared as pointer to const [constVariablePointer] Explanation: In kmemmem(), 'bmGs' is set to 'prep' and then only read ('bmGs[i]' on line 407). It is never written through, so it could be declared 'const int *'. The constVariablePointer warning was a true positive. The PR, which only changes forward value-flow path handling, made it disappear, so this is a new false negative. It is unclear why the PR affects this check: the code has no value-flow-relevant branching on bmGs, and main did not report the equally read-only 'bmBc' either. ---- 220 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-eco/r-cran-eco_4.0-3.orig.tar.gz Result: your eco/src/subroutines.c:172:11: style: Condition 'skip==0' is always true [knownConditionTrueFalse] eco/src/subroutines.c:129:8: note: Assignment 'skip=0', assigned value is 0 eco/src/subroutines.c:138:7: note: Assuming condition is true eco/src/subroutines.c:172:11: note: Condition 'skip==0' is always true Explanation: `skip` is set to 0 at line 129. The only statement that would change it (`skip=1;` at line 163) is commented out. So `skip==0` at line 172 is always true on every path, and the new knownConditionTrueFalse warning is a true positive about a redundant check. The note 'Assuming condition is true' reflects that the else branch ends in `error()` calls. That does not make the warning wrong, because `skip` is never modified on any path. ---- 221 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-interp/r-cran-interp_1.1-6.orig.tar.gz Result: main interp/src/s_hull_pro.cpp:1379:17: style: Condition 'flipped==0' is always true [knownConditionTrueFalse] interp/src/s_hull_pro.cpp:1264:19: note: Assignment 'flipped=0', assigned value is 0 interp/src/s_hull_pro.cpp:1379:17: note: Condition 'flipped==0' is always true Explanation: flipped is set to 0 at line 1264, but the earlier block can set it to 1 at line 1357 on some paths (inside nested conditions). That means 'flipped==0' at line 1379 is not always true, and the warning was a false positive. The PR keeps track of paths that change the value inside nested undecided branches, so the bogus known value is gone. The other two instances (lines 969 and 1827) follow the same pattern. ---- 222 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-interp/r-cran-interp_1.1-6.orig.tar.gz Result: main interp/src/s_hull_pro.cpp:1827:18: style: Condition 'flipped==0' is always true [knownConditionTrueFalse] interp/src/s_hull_pro.cpp:1711:19: note: Assignment 'flipped=0', assigned value is 0 interp/src/s_hull_pro.cpp:1827:18: note: Condition 'flipped==0' is always true Explanation: `flipped` is set to 0 at line 1711. At line 1806 it is set to 1 inside a conditional block (closing at 1823/1824), and that block falls through to the check at 1827 without returning. So `flipped` can be 1 there, and 'flipped==0 is always true' was a false positive. The PR's path splitting no longer drops the path that sets `flipped`, so removing this warning is an improvement. ---- 223 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-interp/r-cran-interp_1.1-6.orig.tar.gz Result: main interp/src/s_hull_pro.cpp:969:18: style: Condition 'flipped==0' is always true [knownConditionTrueFalse] interp/src/s_hull_pro.cpp:853:19: note: Assignment 'flipped=0', assigned value is 0 interp/src/s_hull_pro.cpp:969:18: note: Condition 'flipped==0' is always true Explanation: `flipped` is set to 0 at line 853. Inside the nested conditional block before line 969 it is set to 1 (line 948). On the path through that assignment, `flipped == 0` is false when line 969 is reached, so the condition is not always true. Main apparently let a path that stopped inside the nested branches decide for every path and kept `flipped` known as 0. The PR now tracks partially-terminating paths and no longer reports this. The removed knownConditionTrueFalse warning looks like a false positive, although the code that could reach line 969 without passing line 948 is not fully shown. ---- 224 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-rsqlite/r-cran-rsqlite_2.4.6.orig.tar.gz Result: main RSQLite/src/vendor/sqlite3/sqlite3.c:69870:9: style: Condition '!useWal' is always false [knownConditionTrueFalse] Explanation: This is SQLite's walTryBeginRead(). The preceding block is 'if( !useWal ){ ... }'. Inside it, the function returns early only when rc!=SQLITE_OK or bShmUnreliable is set. When rc==SQLITE_OK and the shm is reliable, the path falls through with useWal==0. So '!useWal' at line 69870 can be true, and the old warning was a false positive. Main wrongly concluded that every path in the block escapes, while some paths reach the end. The PR now tracks partial termination and no longer marks the condition as known. ---- 225 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/radare2/radare2_6.2.6+ds.orig.tar.xz Result: main radare2-6.2.6+ds/libr/arch/p/stm8/pseudo.c:150:13: style: Condition 'nw<5' is always true [knownConditionTrueFalse] radare2-6.2.6+ds/libr/arch/p/stm8/pseudo.c:136:11: note: Assignment 'nw=1', assigned value is 1 radare2-6.2.6+ds/libr/arch/p/stm8/pseudo.c:138:6: note: Assuming condition is true radare2-6.2.6+ds/libr/arch/p/stm8/pseudo.c:141:6: note: nw is incremented', new value is 2 radare2-6.2.6+ds/libr/arch/p/stm8/pseudo.c:150:13: note: Condition 'nw<5' is always true Explanation: 'nw < 5' is the condition of a while loop. nw is 2 when the loop is first entered, but the loop body runs 'wa[nw++] = ptr' on each pass. After three passes nw is 5 and the condition is false; that is the guard that keeps the writes inside wa[5]. So 'always true' only describes the first test, not the loop. The removed warning was a false positive. ---- 226 / 291 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/radare2/radare2_6.2.6+ds.orig.tar.xz Result: main radare2-6.2.6+ds/libr/util/utf8.c:886:13: style: Condition 'ptrlen>1' is always true [knownConditionTrueFalse] radare2-6.2.6+ds/libr/util/utf8.c:863:13: note: Assuming that condition 'ptrlen<2' is not redundant radare2-6.2.6+ds/libr/util/utf8.c:878:13: note: Assuming condition is true radare2-6.2.6+ds/libr/util/utf8.c:882:32: note: Assuming condition is false radare2-6.2.6+ds/libr/util/utf8.c:886:13: note: Condition 'ptrlen>1' is always true Explanation: The early return `if (ptrlen < 2) return` makes `ptrlen > 1` at line 886 always true, so the warning is a true positive. The PR still reports the same warning at the same location; only the error-path notes changed. Main's notes went through the `ptrlen > 2` block at 878/882, and the PR's notes go through the `ptrlen > 3` block at 866/871/874. Both are valid paths, and both start from the real reason, the `ptrlen < 2` check at 863. The change in notes does not matter to users. ---- 227 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/radare2/radare2_6.2.6+ds.orig.tar.xz Result: your radare2-6.2.6+ds/libr/arch/p/8051/8051_ass.c:256:10: warning: Either the condition 'a' is redundant or there is possible null pointer dereference: a. [nullPointerRedundantCheck] radare2-6.2.6+ds/libr/arch/p/8051/8051_ass.c:234:9: note: Assuming that condition 'a' is not redundant radare2-6.2.6+ds/libr/arch/p/8051/8051_ass.c:256:10: note: Null pointer dereference Explanation: The `while (a && b)` condition implies `a` may be NULL. If `a` is NULL and `b` is not (the earlier `!a && !b` check only catches both NULL), the loop never runs and `a` stays NULL. `return *a - *b;` then dereferences it. The null check and the unconditional dereference really contradict each other, so the new nullPointerRedundantCheck is a true positive. ---- 228 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/radare2/radare2_6.2.6+ds.orig.tar.xz Result: your radare2-6.2.6+ds/libr/arch/p/8051/8051_ass.c:256:15: warning: Either the condition 'b' is redundant or there is possible null pointer dereference: b. [nullPointerRedundantCheck] radare2-6.2.6+ds/libr/arch/p/8051/8051_ass.c:234:14: note: Assuming that condition 'b' is not redundant radare2-6.2.6+ds/libr/arch/p/8051/8051_ass.c:256:15: note: Null pointer dereference Explanation: In str_iwhitecasecmp, the loop condition 'while (a && b)' implies b may be null. If b is NULL (with a non-null), the loop is never entered and the function goes straight to 'return *a - *b;', which dereferences the null b. The function also never guards against a single null argument; its early check only handles both being null. The new nullPointerRedundantCheck warning is therefore a true positive that main missed. ---- 229 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/radare2/radare2_6.2.6+ds.orig.tar.xz Result: your radare2-6.2.6+ds/libr/arch/p/sparc/plugin_gnu.c:534:2: style: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction] Explanation: `sz` is set to 0 on several paths before line 534 (the CONDINV, INV and OP33_INV cases), so it cannot have a single known non-boolean value at `return sz;`. main did not warn here. The PR's new path-splitting logic apparently now gives `sz` a known value (e.g. 4) at the return, which is a less accurate valueflow result. `returnNonBoolInBooleanFunction` only fires on a known non-0/1 value, so this new warning comes from that wrong value and is likely a false positive. ---- 230 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/radare2/radare2_6.2.6+ds.orig.tar.xz Result: your radare2-6.2.6+ds/libr/util/utf8.c:886:13: style: Condition 'ptrlen>1' is always true [knownConditionTrueFalse] radare2-6.2.6+ds/libr/util/utf8.c:863:13: note: Assuming that condition 'ptrlen<2' is not redundant radare2-6.2.6+ds/libr/util/utf8.c:866:13: note: Assuming condition is true radare2-6.2.6+ds/libr/util/utf8.c:871:39: note: Assuming condition is false radare2-6.2.6+ds/libr/util/utf8.c:874:32: note: Assuming condition is false radare2-6.2.6+ds/libr/util/utf8.c:886:13: note: Condition 'ptrlen>1' is always true Explanation: Both versions report the same correct warning. After `if (ptrlen < 2) return`, the check `ptrlen > 1` at line 886 is always true. Only the error-path notes changed: main traced the path through `if (ptrlen > 2)`, while the PR traces it through `if (ptrlen > 3)` and its two inner ifs. Both are feasible paths, and the key note (ptrlen<2 checked at line 863) is present in both. The intermediate notes are incidental either way, so users gain or lose nothing. ---- 231 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/rssguard/rssguard_4.8.6+dfsg.orig.tar.xz Result: main rssguard-4.8.6/src/librssguard/3rd-party/sqlite/sqlite3.c:66298:7: style: Condition '!useWal' is always false [knownConditionTrueFalse] Explanation: This is SQLite's walTryBeginRead(). The preceding block is `if( !useWal ){ ... }`. When useWal is 0, the block runs walIndexReadHdr(). It returns only if rc!=SQLITE_OK or bShmUnreliable is set, so the path with rc==SQLITE_OK and a reliable shm falls through with useWal still 0. '!useWal' at line 66298 can therefore be true, and main's 'always false' warning was a false positive. Main most likely treated the block as escaping on every path. The PR tracks which paths actually stop, so it no longer does, and the false positive is gone. ---- 232 / 291 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/rsyslog/rsyslog_8.2610.0.orig.tar.gz Result: your rsyslog-8.2610.0/runtime/queue.c:3300:13: style: Condition 'ret!=RS_RET_OK' is always false [knownConditionTrueFalse] rsyslog-8.2610.0/runtime/queue.c:3122:5: note: Assignment 'iRet=RS_RET_OK', assigned value is 0 rsyslog-8.2610.0/runtime/queue.c:3127:22: note: Assuming condition is true rsyslog-8.2610.0/runtime/queue.c:3299:49: note: Calling function 'DoDeleteBatchFromQStore' returns 0 rsyslog-8.2610.0/runtime/queue.c:3299:49: note: Assignment 'ret=DoDeleteBatchFromQStore(queue,batch->nElemDeq)', assigned value is 0 rsyslog-8.2610.0/runtime/queue.c:3300:13: note: Condition 'ret!=RS_RET_OK' is always false Explanation: The new warning depends on Cppcheck deciding that DoDeleteBatchFromQStore() always returns RS_RET_OK (0). That function's body (around lines 3122–3127) is not shown. The trace starts at 'iRet=RS_RET_OK' and goes through 'Assuming condition is true' at 3127. So the known return value rests on an assumption about a condition inside the callee. If the other branch of that condition can set iRet to an error (for example via rsyslog's CHKiRet/ABORT_FINALIZE goto pattern), the known value is wrong and this is a new false positive caused by the path-splitting change. If the function really never modifies iRet, the check at 3300 is redundant and the warning is a true positive. Without the callee's source neither can be confirmed. ---- 233 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: main samba-4.25.2/source3/locking/brlock.c:640:14: style: Condition 'ex->start<=plock->start+plock->size' is always true [knownConditionTrueFalse] samba-4.25.2/source3/locking/brlock.c:506:18: note: Assuming that condition 'ex->start>(plock->start+plock->size)' is not redundant samba-4.25.2/source3/locking/brlock.c:532:35: note: Assuming condition is false samba-4.25.2/source3/locking/brlock.c:559:33: note: Assuming condition is false samba-4.25.2/source3/locking/brlock.c:596:27: note: Assuming condition is false samba-4.25.2/source3/locking/brlock.c:640:14: note: Condition 'ex->start<=plock->start+plock->size' is always true Explanation: The same knownConditionTrueFalse warning at brlock.c:640 is still reported; only its error path changed. The warning is a true positive: the early return at line 506, taken when 'ex->start > plock->start+plock->size', guarantees that 'ex->start <= plock->start+plock->size' holds at line 640. Main's path cites that line 506 condition, which is the real justification. The PR's path starts at line 559 ('plock->start+plock->size==ex->start'). That condition only rules out equality, so on its own it cannot make '<=' always true. The finding is unchanged, but the explanation users see is less accurate, so this is a minor regression. ---- 234 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: main samba-4.25.2/third_party/heimdal/lib/gssapi/spnego/negoex_util.c:1004:40: error: Uninitialized variables: mech.oid, mech.mech_context, mech.metadata, mech.crypto, mech.verify_crypto, mech.complete, mech.sent_checksum, mech.verified_checksum [uninitvar] Explanation: The removed line is not a lost finding. The same uninitvar report on line 1004 comes back as a 'your' line, now as a warning with an 'Assuming condition is true' note instead of a definite error. Here `mech` is the loop variable of HEIM_TAILQ_FOREACH_SAFE: it is set from the list head and then from `next`, and it points to existing list entries. So reporting its members (oid, mech_context, ...) as uninitialized when it is passed to _gss_negoex_delete_auth_mech is a false positive both before and after. The PR only turns a known value into a possible one, which lowers the severity, but the false positive itself stays. Overall the change hardly matters to users. ---- 235 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: main samba-4.25.2/third_party/heimdal/lib/ntlm/ntlm.c:247:34: style: Condition 'len!=0' is always true [knownConditionTrueFalse] samba-4.25.2/third_party/heimdal/lib/ntlm/ntlm.c:230:13: note: Assuming that condition 'len==0' is not redundant samba-4.25.2/third_party/heimdal/lib/ntlm/ntlm.c:247:34: note: Condition 'len!=0' is always true Explanation: The warning itself is still reported. Only its note path changed. The 'main' line is the old form of the same warning; the 'your' line is the new form. The code returns when len == 0 (line 230), so at line 247 len != 0 is indeed always true. This is a true positive in both versions. The new path adds the step 'Assuming condition is true' at line 238 (the 'if (up)' branch). That step is harmless and arguably adds detail, so the message is at worst equally accurate. The change is essentially cosmetic and leans slightly toward a more detailed error path. ---- 236 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: main samba-4.25.2/third_party/heimdal/lib/sqlite/sqlite3.c:62196:7: style: Condition '!useWal' is always false [knownConditionTrueFalse] Explanation: This is in sqlite's walTryBeginRead(). The block that ends at line 62191 is `if( !useWal ){ ... }`. Inside it, the function returns if rc!=SQLITE_OK, or if pWal->bShmUnreliable is set. Otherwise (rc==SQLITE_OK and bShmUnreliable==0) it falls through to line 62193 with useWal still 0. So `!useWal` at line 62196 can be true, and main's 'always false' warning was a false positive. Main apparently treated the block as always escaping. The PR tracks the paths that leave the block more precisely and recognizes the fall-through, so the false positive is gone. ---- 237 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: your samba-4.25.2/lib/util/tests/test_util_paths.c:102:39: warning: Either the condition 'user==NULL' is redundant or there is possible null pointer dereference: user. [nullPointerRedundantCheck] samba-4.25.2/lib/util/tests/test_util_paths.c:76:11: note: Assuming that condition 'user==NULL' is not redundant samba-4.25.2/lib/util/tests/test_util_paths.c:102:39: note: Null pointer dereference Explanation: If `user == NULL` at line 76 and `getpwuid()` returns NULL, `user` is never assigned and stays NULL. It is then passed to `snprintf` for `%s` at line 102, which is undefined behaviour; glibc happens to print "(null)", but that is not guaranteed. This is the pattern the PR targets: one path changes the value, the other keeps it (as in the new test nullpointer116). The new nullPointerRedundantCheck is therefore a true positive, though it is in test code. ---- 238 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: your samba-4.25.2/source3/locking/brlock.c:640:14: style: Condition 'ex->start<=plock->start+plock->size' is always true [knownConditionTrueFalse] samba-4.25.2/source3/locking/brlock.c:559:33: note: Assuming that condition 'plock->start+plock->size==ex->start' is not redundant samba-4.25.2/source3/locking/brlock.c:596:27: note: Assuming condition is false samba-4.25.2/source3/locking/brlock.c:640:14: note: Condition 'ex->start<=plock->start+plock->size' is always true Explanation: The warning itself is a true positive. In brlock_posix_split_merge, the early check at line 506 (`ex->start > plock->start + plock->size || ...`) returns, so `ex->start <= plock->start + plock->size` is always true at line 640. Main's error path names that real cause: line 506 is not redundant, then the conditions at 532/559/596 are assumed false. The PR's path drops line 506 and names line 559 (`plock->start+plock->size == ex->start`) as the origin. Knowing that equality is false only gives `ex->start != end`, which does not prove `<=`. Same finding, but the explanation shown to users is now incomplete and misleading, so the message got less accurate. ---- 239 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: your samba-4.25.2/source4/libcli/smb2/request.c:109:27: style: Condition '!compound' is always true [knownConditionTrueFalse] samba-4.25.2/source4/libcli/smb2/request.c:54:18: note: Assignment 'compound=false', assigned value is 0 samba-4.25.2/source4/libcli/smb2/request.c:56:6: note: Assuming condition is true samba-4.25.2/source4/libcli/smb2/request.c:65:10: note: Assuming condition is false samba-4.25.2/source4/libcli/smb2/request.c:77:22: note: Assuming condition is false samba-4.25.2/source4/libcli/smb2/request.c:109:27: note: Condition '!compound' is always true Explanation: In smb2_request_init, `compound` is initialized to false at line 54. The visible code (lines 70-109) never assigns it, and the notes show no assignment in lines 56-77 either; as recalled from the Samba source, it stays false through the whole function. So `!compound` at line 109 is always true, and the condition is redundant leftover code. The new knownConditionTrueFalse warning is a true positive that main missed. The 'Assuming condition' notes in the path are slightly noisy but do not affect correctness. Confidence is medium because lines 54-68 are not shown. ---- 240 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: your samba-4.25.2/third_party/heimdal/lib/gssapi/spnego/negoex_util.c:1004:40: warning: Uninitialized variables: mech.oid, mech.mech_context, mech.metadata, mech.crypto, mech.verify_crypto, mech.complete, mech.sent_checksum, mech.verified_checksum [uninitvar] samba-4.25.2/third_party/heimdal/lib/gssapi/spnego/negoex_util.c:1003:6: note: Assuming condition is true samba-4.25.2/third_party/heimdal/lib/gssapi/spnego/negoex_util.c:1004:40: note: Uninitialized variables: mech.oid, mech.mech_context, mech.metadata, mech.crypto, mech.verify_crypto, mech.complete, mech.sent_checksum, mech.verified_checksum Explanation: In _gss_negoex_restrict_auth_schemes, `mech` is a pointer taken from the ctx->negoex_mechs list by HEIM_TAILQ_FOREACH_SAFE. Its fields belong to existing list entries, so passing `mech` to _gss_negoex_delete_auth_mech does not read uninitialized memory. The uninitvar report is a false positive both before and after the PR. The PR only changes its form: main reported it unconditionally as an error, and the PR reports it as a warning tied to the `if (!found)` condition at line 1003. The same false positive remains at the same location, so this changes nothing meaningful for users. ---- 241 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/samba/samba_4.25.2+dfsg.orig.tar.xz Result: your samba-4.25.2/third_party/heimdal/lib/ntlm/ntlm.c:247:34: style: Condition 'len!=0' is always true [knownConditionTrueFalse] samba-4.25.2/third_party/heimdal/lib/ntlm/ntlm.c:230:13: note: Assuming that condition 'len==0' is not redundant samba-4.25.2/third_party/heimdal/lib/ntlm/ntlm.c:238:9: note: Assuming condition is true samba-4.25.2/third_party/heimdal/lib/ntlm/ntlm.c:247:34: note: Condition 'len!=0' is always true Explanation: Main and the PR both report the same true positive. Line 230 returns when len == 0, so len != 0 is always true at line 247, and the 'if (up)' loop does not change len. The only difference is a new note in the error path, 'Assuming condition is true' at line 238 ('if (up)'). That assumption has nothing to do with the warning: len != 0 holds whether up is true or false. The note appears because the then-path fork is now carried past the if. It suggests the result depends on 'up', so the message is slightly less accurate. ---- 242 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sludge/sludge_2.3.1.orig.tar.gz Result: main sludge-2.3.1/source/Engine/movie.cpp:631:16: warning: Either the condition 'pBlockEntry==NULL' is redundant or there is possible null pointer dereference: pBlockEntry. [nullPointerRedundantCheck] sludge-2.3.1/source/Engine/movie.cpp:623:24: note: Assuming that condition 'pBlockEntry==NULL' is not redundant sludge-2.3.1/source/Engine/movie.cpp:631:16: note: Null pointer dereference Explanation: At line 623, if pBlockEntry is NULL the then-block runs. That block either jumps away with 'goto movieHasEnded' or reassigns 'pBlockEntry = pCluster->GetFirst()'. So the NULL value checked at line 623 can never reach the dereference at line 631. Main's nullPointerRedundantCheck was a false positive, and the PR's more precise path handling of the branch removes it. ---- 243 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/smlnj/smlnj_110.99.9.orig.tar.gz Result: main smlnj-110.99.9/base/runtime/gc/blast-gc.c:153:9: warning: Uninitialized variables: result.needsRepair, result.maxGen [uninitvar] smlnj-110.99.9/base/runtime/gc/blast-gc.c:151:9: note: Assuming condition is true smlnj-110.99.9/base/runtime/gc/blast-gc.c:153:9: note: Uninitialized variables: result.needsRepair, result.maxGen Explanation: BlastGC returns `result` at line 153 with `needsRepair` and `maxGen` never assigned, so the uninitvar warning is a true positive in both versions. The PR did not drop the finding; it rewrote the message. The new message lists each field twice ('result.needsRepair, result.needsRepair, result.maxGen, result.maxGen'). It also adds a note 'Assuming condition is true' at 150:5, which points at an `if` inside the BlastGC_CheckWord macro. The duplicates most likely come from the new forked paths each carrying their own uninit value into the same token. The warning is therefore noisier and less accurate than before. ---- 244 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/smlnj/smlnj_110.99.9.orig.tar.gz Result: your smlnj-110.99.9/base/runtime/gc/blast-gc.c:153:9: warning: Uninitialized variables: result.needsRepair, result.needsRepair, result.maxGen, result.maxGen [uninitvar] smlnj-110.99.9/base/runtime/gc/blast-gc.c:150:5: note: Assuming condition is true smlnj-110.99.9/base/runtime/gc/blast-gc.c:151:9: note: Assuming condition is true smlnj-110.99.9/base/runtime/gc/blast-gc.c:153:9: note: Uninitialized variables: result.needsRepair, result.needsRepair, result.maxGen, result.maxGen Explanation: In BlastGC, `result.needsRepair` and `result.maxGen` are only assigned at the end of the function. The early `return result;` at line 153 copies a struct with those two fields uninitialized, so the warning is a true positive in both versions. With the PR the same warning lists each field twice ('result.needsRepair, result.needsRepair, result.maxGen, result.maxGen') and adds an extra 'Assuming condition is true' step for a condition inside the BlastGC_CheckWord macro. This probably happens because the new path splitting makes two uninit values reach the same spot. The finding stays the same, but the message is now duplicated and noisier, so it is less accurate. ---- 245 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/smp-utils/smp-utils_0.99.orig.tar.xz Result: main smp_utils-0.99/src/smp_discover.c:860:13: style: Condition 'len>117' is always false [knownConditionTrueFalse] smp_utils-0.99/src/smp_discover.c:790:13: note: Assuming that condition 'len>59' is not redundant smp_utils-0.99/src/smp_discover.c:860:13: note: Condition 'len>117' is always false Explanation: Line 860 sits in a chain of `if (len > N)` checks with rising thresholds (95, 107, 109, 115, 117, 118). Each one only prints fields from a response buffer whose length comes from the device. Claiming `len>117` is always false after assuming `len>59` makes no sense: a long enough response makes it true. Main most likely carried a wrong known value out of the block at line 790 (not shown), where only some paths return. That is the path-splitting case this PR fixes. The same warning in smp_discover_list.c disappears too, so removing it looks like dropping a false positive. ---- 246 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/smp-utils/smp-utils_0.99.orig.tar.xz Result: main smp_utils-0.99/src/smp_discover_list.c:744:13: style: Condition 'len>117' is always false [knownConditionTrueFalse] smp_utils-0.99/src/smp_discover_list.c:674:13: note: Assuming that condition 'len>59' is not redundant smp_utils-0.99/src/smp_discover_list.c:744:13: note: Condition 'len>117' is always false Explanation: `len` is a descriptor/response length, and the function prints fields up to byte 118 under a chain of increasing `len > N` checks. Main claimed `len > 117` is always false only by assuming `len > 59` is not redundant. That only makes sense if Cppcheck treated the `len > 59` block (line 674, not shown) as always escaping. Such a block most likely returns on some paths only (e.g. brief output). The PR targets exactly this case: a block where only some paths return is no longer treated as dead. For larger descriptors `len > 117` can clearly be true, so the removed warning was a false positive. The identical removal in smp_discover.c points to the same fix. ---- 247 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/snibbetracker/snibbetracker_1.1.1.orig.tar.gz Result: your snibbetracker-1.1.1/snibbetracker/src/main.c:4179:64: style: Condition 'editing' is always true [knownConditionTrueFalse] snibbetracker-1.1.1/snibbetracker/src/main.c:4153:37: note: Assuming that condition 'editing' is not redundant snibbetracker-1.1.1/snibbetracker/src/main.c:4169:32: note: Assuming condition is true snibbetracker-1.1.1/snibbetracker/src/main.c:4179:64: note: Condition 'editing' is always true Explanation: Line 4179 is inside the block guarded by `if(selection_enabled && editing)` at line 4153. Between the two lines only local variables (`sel_x`, `vis_x`, `inside_selection_x/y`) are assigned, and the only calls are to `floor()`, so `editing` cannot change. The `editing` operand at 4179 is therefore redundant and always true. The PR now keeps the known value through the undecided ifs at 4159/4169, so this new warning is a true positive. The note 'Assuming condition is true' at 4169 is slightly odd but harmless. ---- 248 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/sollya/sollya_8.0+ds.orig.tar.xz Result: main sollya-8.0+ds/supnorm.c:745:25: error: Uninitialized variable: shiftedDom [uninitvar] Explanation: `shiftedDom` is declared and not initialized before line 745 on every path, so its uninitialized state does not depend on `if (res)`. Main reported it as a known value (error severity). With the PR the value has become 'possible', shown by the warning severity and the new 'Assuming condition is true' note on line 730. That is less precise value flow: the fork on `res = 0` inside the else block weakens a fact that holds on every path. The finding itself is likely a false positive anyway, because `sollya_mpfi_init2` is what initializes `shiftedDom`. Users therefore see the same doubtful report with a less accurate explanation, so this is a slight regression rather than a fix. ---- 249 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/sollya/sollya_8.0+ds.orig.tar.xz Result: your sollya-8.0+ds/supnorm.c:745:25: warning: Uninitialized variable: shiftedDom [uninitvar] sollya-8.0+ds/supnorm.c:730:9: note: Assuming condition is true sollya-8.0+ds/supnorm.c:745:25: note: Uninitialized variable: shiftedDom Explanation: The same uninitvar report on `shiftedDom` at line 745 is still there; only its severity dropped from error to warning, with an added 'Assuming condition is true' note on `if (res)`. The report is most likely a false positive in both versions: `sollya_mpfi_init2(shiftedDom, ...)` is the call that initializes the MPFI variable, so passing it uninitialized is the intended use. On the other hand, nothing between the declaration and line 745 depends on `res`, so if Cppcheck takes the variable to be read here, 'known' (error) was the more faithful classification and the drop to 'possible' slightly misdescribes the flow. The warning is still emitted either way, so the practical effect for users is negligible. ---- 250 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/sphde/sphde_1.4.0.orig.tar.xz Result: your sphde-1.4.0/src/tests/sphlockfreeheap_t.c:1011:8: style: Condition '0!=strcmp(temp0,"temp0")' is always false [knownConditionTrueFalse] sphde-1.4.0/src/tests/sphlockfreeheap_t.c:940:8: note: Assuming that condition '0!=strcmp(temp0,"temp0")' is not redundant sphde-1.4.0/src/tests/sphlockfreeheap_t.c:948:6: note: Assuming condition is true sphde-1.4.0/src/tests/sphlockfreeheap_t.c:993:6: note: Assuming condition is true sphde-1.4.0/src/tests/sphlockfreeheap_t.c:1011:8: note: Condition '0!=strcmp(temp0,"temp0")' is always false Explanation: Line 1011 re-checks the contents of `temp0` after a new heap allocation and `strcpy(temp3, "temp3")`. This is a deliberate data-integrity check in an allocator test: if the lock-free heap is buggy, `temp3` can overlap `temp0` and the string changes. Cppcheck cannot prove `temp0` and `temp3` do not alias, so calling the condition 'always false' is not justified. The new warning is also odd: its note chain starts from the check at line 940 and skips the identical check at line 985, which suggests the new path joining carried the earlier state too far. Main did not report this. The PR adds a doubtful knownConditionTrueFalse on intentionally redundant verification code, so this looks like a new false positive. ---- 251 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sqlcipher/sqlcipher_4.20.0.orig.tar.gz Result: main sqlcipher-4.20.0/autosetup/jimsh0.c:22018:13: style: Condition 'len<0' is always false [knownConditionTrueFalse] sqlcipher-4.20.0/autosetup/jimsh0.c:22013:32: note: Assuming that condition 'start>end' is not redundant sqlcipher-4.20.0/autosetup/jimsh0.c:22011:15: note: Assuming condition is false sqlcipher-4.20.0/autosetup/jimsh0.c:22017:15: note: Assignment 'len=end-start', assigned value is greater than -1 sqlcipher-4.20.0/autosetup/jimsh0.c:22018:13: note: Condition 'len<0' is always false Explanation: At line 22018, `len = end - start` can be negative. When `step < 0`, the check `step > 0 && start > end` does not apply. The following check only rejects `end > start`, so `start > end` (len < 0) is a valid path. Main wrongly treated `start <= end` as holding on every path past the else-if chain and called `len<0` always false. That was a false positive, and the PR removes it. ---- 252 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sqlcipher/sqlcipher_4.20.0.orig.tar.gz Result: main sqlcipher-4.20.0/autosetup/jimsh0.c:22022:26: warning: Either the condition 'step>0' is redundant or there is division by zero at line 22022. [zerodivcond] sqlcipher-4.20.0/autosetup/jimsh0.c:22013:19: note: Assuming that condition 'step>0' is not redundant sqlcipher-4.20.0/autosetup/jimsh0.c:22011:15: note: Assuming condition is false sqlcipher-4.20.0/autosetup/jimsh0.c:22022:26: note: Division by zero Explanation: JimRangeLen returns early when step == 0 (line 22009). So step is never 0 at line 22022, and the zerodivcond warning there was a false positive. The warning was based on the 'step>0' condition at line 22013. That condition sits on an else-if path whose then-block returns, and it does not imply step could be 0 afterwards. step can only be negative or positive at that point, and 'step = -step' keeps it non-zero. The PR handles if/else-if paths and escapes more precisely, which removed this false positive. ---- 253 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sqlcipher/sqlcipher_4.20.0.orig.tar.gz Result: main sqlcipher-4.20.0/src/wal.c:3216:9: style: Condition '!useWal' is always false [knownConditionTrueFalse] Explanation: This is SQLite's walTryBeginRead(), where useWal is a parameter. The preceding block is 'if( !useWal ){ ... }'. Inside it, the path returns only when rc!=SQLITE_OK or when bShmUnreliable is set. When rc==SQLITE_OK and bShmUnreliable is 0, the path falls through to line 3216 with useWal still 0. So '!useWal' can be true there, and main's 'always false' warning was a false positive. Main's flow analysis treated the escaping paths in that block as if every path escaped. The PR tracks paths that reach the end separately from paths that stop, which removes this false positive. ---- 254 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/squeak-vm/squeak-vm_4.10.2.2614+20120917~dfsg.orig.tar.xz Result: main opensmalltalk-vm-00aa355bd2f0fcfbe9b7110a70b486f89c85c55d/platforms/Cross/plugins/FloatMathPlugin/fdlibm/e_exp.c:147:5: error: Uninitialized variable: k [legacyUninitvar] Explanation: The removed legacyUninitvar error at line 147 is replaced by an uninitvar warning at the same spot. Both report the same issue: `k` is never assigned when `hx < 0x3e300000` and `huge+x>one` is false. In practice that condition is always true (`huge` is 1e300), so the path cannot happen, but both versions flag it. The new message adds a path and lowers the severity to warning. It is the same finding from a different checker, so users see no real change. ---- 255 / 291 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/squeak-vm/squeak-vm_4.10.2.2614+20120917~dfsg.orig.tar.xz Result: your opensmalltalk-vm-00aa355bd2f0fcfbe9b7110a70b486f89c85c55d/platforms/Cross/plugins/FloatMathPlugin/fdlibm/e_exp.c:147:5: warning: Uninitialized variable: k [uninitvar] opensmalltalk-vm-00aa355bd2f0fcfbe9b7110a70b486f89c85c55d/platforms/Cross/plugins/FloatMathPlugin/fdlibm/e_exp.c:128:8: note: Assuming condition is false opensmalltalk-vm-00aa355bd2f0fcfbe9b7110a70b486f89c85c55d/platforms/Cross/plugins/FloatMathPlugin/fdlibm/e_exp.c:139:13: note: Assuming condition is true opensmalltalk-vm-00aa355bd2f0fcfbe9b7110a70b486f89c85c55d/platforms/Cross/plugins/FloatMathPlugin/fdlibm/e_exp.c:140:15: note: Assuming condition is false opensmalltalk-vm-00aa355bd2f0fcfbe9b7110a70b486f89c85c55d/platforms/Cross/plugins/FloatMathPlugin/fdlibm/e_exp.c:147:5: note: Uninitialized variable: k Explanation: This is the classic fdlibm exp(). `k` is left unset only on the path where `hx < 0x3e300000` and `huge+x>one` is false. For |x| < 2^-28 and huge = 1e300 that condition is always true, so the path cannot happen. Both versions report this same false positive at line 147. Main reports it as a `legacyUninitvar` error; the PR reports it as a ValueFlow `uninitvar` warning with a path that assumes the infeasible condition. The finding, its location and its correctness are unchanged; only the checker and severity differ. The lower severity and the shown path are slightly friendlier, but the result is still a false positive. ---- 256 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/starpu/starpu_1.4.10+dfsg.orig.tar.gz Result: your starpu-1.4.10+dfsg/sc_hypervisor/src/hypervisor_policies/teft_lp_policy.c:127:8: warning: If memory allocation fails, then there is a possible null pointer dereference: tasks [nullPointerOutOfMemory] starpu-1.4.10+dfsg/sc_hypervisor/src/hypervisor_policies/teft_lp_policy.c:88:33: note: Assuming allocation function fails starpu-1.4.10+dfsg/sc_hypervisor/src/hypervisor_policies/teft_lp_policy.c:88:17: note: Assignment 'tasks=(double**)malloc(nw*sizeof(double*))', assigned value is 0 starpu-1.4.10+dfsg/sc_hypervisor/src/hypervisor_policies/teft_lp_policy.c:127:8: note: Null pointer dereference Explanation: `tasks` comes from an unchecked malloc at line 88. Line 91 (`tasks[i] = ...` inside `for(i = 0; i < nw; i++)`) already dereferences it. Line 127 runs the same loop over `nw`. If `tasks` were NULL and `nw > 0`, the program would already have crashed at line 91. If `nw <= 0`, the loop at 127 does not run. So line 127 can never dereference a NULL `tasks`. The missing malloc check is a real issue, but it belongs at line 91, which this diff does not touch. The new warning at 127 is therefore either infeasible or a duplicate of the earlier one. It most likely appears because the PR's path handling now carries the null value past the loop and the following ifs, losing the link between the two `i < nw` loops. ---- 257 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sunclock/sunclock_3.57.orig.tar.gz Result: main sunclock-3.57/sunclock.c:3192:11: style: Condition 'i>0' is always true [knownConditionTrueFalse] sunclock-3.57/sunclock.c:3182:7: note: Assignment 'i=11', assigned value is 11 sunclock-3.57/sunclock.c:3192:11: note: Condition 'i>0' is always true Explanation: The while loop decrements i from 11 (`--i`) on every iteration where `val[i-1] > quot`. If quot is small enough, i reaches 0, so `i>0` is not always true. Only the first evaluation is known true. The warning in main was a false positive, and the PR removes it. ---- 258 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tango/tango_10.3.3+dfsg1.orig.tar.xz Result: main tango-10.3.3/lib/cpp/src/client/Connection_asyn_cb.cpp:848:51: error: Null pointer dereference: serv_ex [nullPointer] tango-10.3.3/lib/cpp/src/client/Connection_asyn_cb.cpp:770:47: note: Assignment 'serv_ex=nullptr', assigned value is 0 tango-10.3.3/lib/cpp/src/client/Connection_asyn_cb.cpp:848:51: note: Null pointer dereference Explanation: Line 820 calls `unk_ex->exception() >>= serv_ex;`. This is a CORBA Any extraction that takes `serv_ex` by reference and sets it, so the `nullptr` assigned at line 770 no longer holds afterwards. Line 821 already dereferences `serv_ex` (`ex = *serv_ex;`) without a warning, so a report only at line 848 is inconsistent and points to a confused value-flow path. The code is in the branch where the exception is not a MultiDevFailed, and the extraction is expected to succeed there. The removed nullPointer report is most likely a false positive, so removing it is an improvement. ---- 259 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tkhtml1/tkhtml1_1.04.orig.tar.gz Result: your tkhtml1-1.04/tools/makeheaders.c:3048:11: style: Condition 'pFile' is always true [knownConditionTrueFalse] Explanation: CreateInFile() takes &nErr and the caller checks its result, which suggests it has error paths that increment *pnErr and return 0. If so, pFile can be null, and 'Condition pFile is always true' is a false positive. The function body is not shown, so this is inferred from the call pattern. The warning appears only with the PR, which changes how forward analysis combines terminating paths. That makes it likely the new path merging wrongly drops the 'return 0' path from the function's possible return values. ---- 260 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/arguments.c:39:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/arguments.c:217:18: note: Assuming allocation function fails tmate-2.4.0/arguments.c:217:18: note: Assignment 'entry=xcalloc(1,sizeof(*entry))', assigned value is 0 tmate-2.4.0/arguments.c:219:3: note: Calling function 'args_tree_RB_INSERT', 2nd argument 'entry' value is 0 tmate-2.4.0/arguments.c:39:1: note: Assuming condition is false tmate-2.4.0/arguments.c:39:1: note: Calling function 'args_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/arguments.c:39:1: note: Null pointer dereference Explanation: The new warning claims that `elm` is NULL inside the macro-generated `args_tree_RB_INSERT_COLOR`, on the assumption that `xcalloc()` at line 217 fails. In tmate/tmux, `xcalloc` and `xmalloc` are wrappers that call `fatalx()` when allocation fails, so they never return NULL. The path cannot happen in this code. Even under cppcheck's assumption, `RB_INSERT` already dereferences `elm` before it calls `RB_INSERT_COLOR` (via `RB_SET` and the compare function). Reporting it again in the inner call is redundant, and it lands on the `RB_GENERATE` macro line, so it is hard for users to act on. The PR makes the same pattern appear 12 times across the package, all in RB-tree macro code. That is new noise, most likely because the reworked path splitting now carries the NULL value into the nested call. It does not reflect a real bug. ---- 261 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/environ.c:33:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/environ.c:134:19: note: Assuming allocation function fails tmate-2.4.0/environ.c:134:19: note: Assignment 'envent=xmalloc(sizeof(*envent))', assigned value is 0 tmate-2.4.0/environ.c:137:3: note: Calling function 'environ_RB_INSERT', 2nd argument 'envent' value is 0 tmate-2.4.0/environ.c:33:1: note: Assuming condition is false tmate-2.4.0/environ.c:33:1: note: Calling function 'environ_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/environ.c:33:1: note: Null pointer dereference Explanation: The new inconclusive nullPointerOutOfMemory assumes tmux's xmalloc() returns NULL. In tmate/tmux, xmalloc() calls fatal() on failure and never returns NULL, so the warning cannot happen in practice. The reported path is also odd. RB_INSERT dereferences elm while comparing and in RB_SET before it ever calls RB_INSERT_COLOR, yet the dereference is blamed inside the generated RB_INSERT_COLOR at the RB_GENERATE line. This warning and the 11 identical ones in the package only appear because the PR changed how forward analysis carries values across branches inside the macro-generated tree code. They are noise users would see as false positives, not newly found bugs. ---- 262 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/format.c:128:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/format.c:585:14: note: Assuming allocation function fails tmate-2.4.0/format.c:585:14: note: Assignment 'fe=xmalloc(sizeof(*fe))', assigned value is 0 tmate-2.4.0/format.c:588:11: note: Calling function 'format_entry_tree_RB_INSERT', 2nd argument 'fe' value is 0 tmate-2.4.0/format.c:128:1: note: Assuming condition is false tmate-2.4.0/format.c:128:1: note: Calling function 'format_entry_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/format.c:128:1: note: Null pointer dereference Explanation: The new warning follows a NULL from a failed `xmalloc` in `format_add` into the macro-generated `format_entry_tree_RB_INSERT`, then into `RB_INSERT_COLOR`, and reports the dereference there. In tmate (tmux code), `xmalloc` never returns NULL: it calls fatal on failure. So in practice the path cannot happen. Even taking the out-of-memory assumption at face value, `fe` is already dereferenced at line 586 (`fe->key = ...`), before `RB_INSERT` is called. Inside `RB_INSERT`, `elm` is also dereferenced by `cmp` and `RB_SET` before `RB_INSERT_COLOR` is reached. The new report therefore points into generated macro code (line 128:1) with a path that adds nothing over the call-site issue. The same pattern appears 12 times across the package. It looks like the PR now lets the value flow past the `while` loop in `RB_INSERT`, which has a partial `return`, and this only adds noise. Most likely a regression in user-visible output, though the warning is inconclusive and technically consistent with the out-of-memory assumption. ---- 263 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/format.c:92:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/format.c:238:15: note: Assuming allocation function fails tmate-2.4.0/format.c:238:15: note: Assignment 'fj=xcalloc(1,sizeof(*fj))', assigned value is 0 tmate-2.4.0/format.c:243:3: note: Calling function 'format_job_tree_RB_INSERT', 2nd argument 'fj' value is 0 tmate-2.4.0/format.c:92:1: note: Assuming condition is false tmate-2.4.0/format.c:92:1: note: Calling function 'format_job_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/format.c:92:1: note: Null pointer dereference Explanation: In tmate, `xcalloc`/`xmalloc` are wrappers that call `fatal()` when allocation fails, so they never return NULL. The premise of nullPointerOutOfMemory is therefore false. The reported path is also odd. The generated `RB_INSERT` already writes through `elm` (via `RB_SET`) before it calls `RB_INSERT_COLOR`, yet the warning lands inside `INSERT_COLOR` behind an 'Assuming condition is false' step. That is a sign of new path-splitting artifacts, not a real finding. The same new warning appears for every `RB_GENERATE` tree in the package (12 warnings), which points to a systematic new false positive introduced by the forward-analysis change rather than newly found bugs. ---- 264 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/hooks.c:33:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/hooks.c:103:16: note: Assuming allocation function fails tmate-2.4.0/hooks.c:103:16: note: Assignment 'hook=xcalloc(1,sizeof(*hook))', assigned value is 0 tmate-2.4.0/hooks.c:107:2: note: Calling function 'hooks_tree_RB_INSERT', 2nd argument 'hook' value is 0 tmate-2.4.0/hooks.c:33:1: note: Assuming condition is false tmate-2.4.0/hooks.c:33:1: note: Calling function 'hooks_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/hooks.c:33:1: note: Null pointer dereference Explanation: The new warning says that if `hook = xcalloc(...)` at line 103 returns NULL, `hooks_tree_RB_INSERT` passes a null `elm` to `RB_INSERT_COLOR` inside the `RB_GENERATE` macro expansion. In tmate, `xcalloc`/`xmalloc` call `fatalx()` when allocation fails, so they never return NULL. The warning is therefore a false positive. The same pattern appears in 12 places across the package, all from `RB_INSERT` after an x*alloc call. Main did not report it; the PR's new path splitting now carries the null value through the loop inside `RB_INSERT`. Even within Cppcheck's own model the location is odd: `elm` is already dereferenced earlier in `RB_INSERT` (by `RB_SET`), yet the report points at the later `RB_INSERT_COLOR` call. This is new noise in macro-generated code, so it is a regression. ---- 265 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/key-bindings.c:27:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/key-bindings.c:103:14: note: Assuming allocation function fails tmate-2.4.0/key-bindings.c:103:14: note: Assignment 'bd=xmalloc(sizeof(*bd))', assigned value is 0 tmate-2.4.0/key-bindings.c:105:2: note: Calling function 'key_bindings_RB_INSERT', 2nd argument 'bd' value is 0 tmate-2.4.0/key-bindings.c:27:1: note: Assuming condition is false tmate-2.4.0/key-bindings.c:27:1: note: Calling function 'key_bindings_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/key-bindings.c:27:1: note: Null pointer dereference Explanation: In tmux/tmate, `xmalloc` never returns NULL: it calls `fatalx` on failure. So line 103 cannot give a null `bd`. Even assuming it could, `bd` is dereferenced at line 104 (`bd->key = key`). Inside the generated RB_INSERT, `elm` is dereferenced again by RB_SET before RB_INSERT_COLOR is ever called. The new report deep inside RB_INSERT_COLOR is therefore unreachable with a null value and duplicates earlier dereference sites. The PR's path splitting now carries the null argument value past the while loop with its early return, and this produces the same macro-internal noise in every RB_GENERATE instance (12 new warnings across the package). These are new false positives. ---- 266 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/mode-key.c:523:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/mode-key.c:581:19: note: Assuming allocation function fails tmate-2.4.0/mode-key.c:581:19: note: Assignment 'mbind=xmalloc(sizeof(*mbind))', assigned value is 0 tmate-2.4.0/mode-key.c:586:4: note: Calling function 'mode_key_tree_RB_INSERT', 2nd argument 'mbind' value is 0 tmate-2.4.0/mode-key.c:523:1: note: Assuming condition is false tmate-2.4.0/mode-key.c:523:1: note: Calling function 'mode_key_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/mode-key.c:523:1: note: Null pointer dereference Explanation: The new warning says the result of tmate's `xmalloc()` (mode-key.c:581) may be NULL and is dereferenced inside the macro-generated `mode_key_tree_RB_INSERT_COLOR`. tmate's `xmalloc`/`xcalloc` never return NULL: they call `fatal` when allocation fails, like the usual GNU-style wrappers. So the 'allocation fails' path cannot happen. The same pattern appears for every `RB_GENERATE` tree in the package (12 new warnings), all through `xmalloc`/`xcalloc`. The trace is also odd. The generated `RB_INSERT` already dereferences `elm` (the compare call and `RB_SET`) before it calls `RB_INSERT_COLOR`, yet the warning is placed only in `INSERT_COLOR` after 'Assuming condition is false'. This looks like the PR's new path splitting and the `Partial` terminate letting the value through the generated tree code where main dropped it. The result is noisy inconclusive warnings on code that is safe in practice. ---- 267 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/options.c:39:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/options.c:206:14: note: Assuming allocation function fails tmate-2.4.0/options.c:206:14: note: Assignment 'o=xmalloc(sizeof(*o))', assigned value is 0 tmate-2.4.0/options.c:208:3: note: Calling function 'options_tree_RB_INSERT', 2nd argument 'o' value is 0 tmate-2.4.0/options.c:39:1: note: Assuming condition is false tmate-2.4.0/options.c:39:1: note: Calling function 'options_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/options.c:39:1: note: Null pointer dereference Explanation: The PR adds 12 identical inconclusive nullPointerOutOfMemory warnings inside RB_GENERATE macro code. In tmate (as in tmux), xmalloc/xcalloc never return NULL: they call fatalx() when allocation fails. So `o = xmalloc(...)` at options.c:206 can never be null when it is passed to options_tree_RB_INSERT. The path is also implausible. It assumes the tree is empty, yet it reports the dereference inside RB_INSERT_COLOR, although RB_INSERT has already written through elm via RB_SET. The PR's path-splitting changes now carry a value into the generated tree code that main did not carry there. The new warnings are false positives. ---- 268 / 291 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/paste.c:52:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/paste.c:256:14: note: Assuming allocation function fails tmate-2.4.0/paste.c:256:14: note: Assignment 'pb=xmalloc(sizeof(*pb))', assigned value is 0 tmate-2.4.0/paste.c:269:2: note: Calling function 'paste_name_tree_RB_INSERT', 2nd argument 'pb' value is 0 tmate-2.4.0/paste.c:52:1: note: Assuming condition is false tmate-2.4.0/paste.c:52:1: note: Calling function 'paste_name_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/paste.c:52:1: note: Null pointer dereference Explanation: In tmate, `xmalloc`/`xcalloc` call `fatal` on failure and never return NULL, so the scenario this warning describes (`pb` is 0 when passed to `paste_name_tree_RB_INSERT` and then to `RB_INSERT_COLOR`) cannot happen. Even under Cppcheck's model that the allocation can fail, `pb` is already dereferenced in `paste_add` (`pb->name = NULL` and the loop that builds the name) before `RB_INSERT` at line 269. Inside the generated `RB_INSERT`, `elm` is also dereferenced by `RB_SET` before `RB_INSERT_COLOR` is called. So this new report follows a path that has already crashed earlier and only repeats the same issue. The PR made the null value survive through the macro-generated insert code (empty-tree path, then into `RB_INSERT_COLOR`), producing 12 identical new inconclusive warnings in this package. They are noise rather than new findings. ---- 269 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/paste.c:56:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/paste.c:256:14: note: Assuming allocation function fails tmate-2.4.0/paste.c:256:14: note: Assignment 'pb=xmalloc(sizeof(*pb))', assigned value is 0 tmate-2.4.0/paste.c:270:2: note: Calling function 'paste_time_tree_RB_INSERT', 2nd argument 'pb' value is 0 tmate-2.4.0/paste.c:56:1: note: Assuming condition is false tmate-2.4.0/paste.c:56:1: note: Calling function 'paste_time_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/paste.c:56:1: note: Null pointer dereference Explanation: In tmate, `xmalloc` and `xcalloc` never return NULL: they call `fatal` when allocation fails. So the premise "if memory allocation fails, elm is null" cannot happen at runtime, and this inconclusive warning is a false positive. The path is also odd. It reports the dereference inside `RB_INSERT_COLOR`, inside the `RB_GENERATE` macro expansion, but `RB_INSERT` already dereferences `elm` via `RB_SET` before that call. This suggests the new path-splitting logic in the PR lets a null value flow through the macro-generated `RB_INSERT` paths that main correctly dropped. The same new warning appears for every `RB_GENERATE` tree in the package (12 in total), which points to a systematic new false positive rather than real bugs. ---- 270 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/window.c:76:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/window.c:170:14: note: Assuming allocation function fails tmate-2.4.0/window.c:170:14: note: Assignment 'wl=xcalloc(1,sizeof(*wl))', assigned value is 0 tmate-2.4.0/window.c:172:2: note: Calling function 'winlinks_RB_INSERT', 2nd argument 'wl' value is 0 tmate-2.4.0/window.c:76:1: note: Assuming condition is false tmate-2.4.0/window.c:76:1: note: Calling function 'winlinks_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/window.c:76:1: note: Null pointer dereference Explanation: In tmate, `xcalloc`/`xmalloc` call `fatalx()` on failure and never return NULL, so `wl` at window.c:170 cannot be null. The new chain also runs through macro-generated `RB_INSERT` code, where `elm` is already dereferenced (`cmp(elm, parent)`, `RB_SET(elm, ...)`) before `RB_INSERT_COLOR` is called. Reporting the null dereference inside `RB_INSERT_COLOR` is therefore noise. The same new warning appears at every RB_GENERATE site in the package, which points to the PR's path splitting now carrying an allocation-failure value deeper through the generated code. It does not point to a real defect. These are new false positives. ---- 271 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tmate/tmate_2.4.0.orig.tar.gz Result: your tmate-2.4.0/window.c:84:1: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: elm [nullPointerOutOfMemory] tmate-2.4.0/window.c:750:14: note: Assuming allocation function fails tmate-2.4.0/window.c:750:14: note: Assignment 'wp=xcalloc(1,sizeof(*wp))', assigned value is 0 tmate-2.4.0/window.c:754:2: note: Calling function 'window_pane_tree_RB_INSERT', 2nd argument 'wp' value is 0 tmate-2.4.0/window.c:84:1: note: Assuming condition is false tmate-2.4.0/window.c:84:1: note: Calling function 'window_pane_tree_RB_INSERT_COLOR', 2nd argument 'elm' value is 0 tmate-2.4.0/window.c:84:1: note: Null pointer dereference Explanation: In tmate, xcalloc() aborts via fatal() when calloc fails, so wp can never be NULL at line 750. The 'allocation fails' path this warning relies on therefore does not exist. The PR adds the same inconclusive nullPointerOutOfMemory warning for every RB_GENERATE tree in the package (12 new warnings). Each one follows a path through the macro-expanded RB_INSERT into RB_INSERT_COLOR. That path already dereferences elm earlier (RB_SET in RB_INSERT), yet main did not report anything there. This points to a side effect of the new path splitting rather than a newly found real bug. It is a new false positive. ---- 272 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/ukwm/ukwm_1.2.3.orig.tar.gz Result: main ukwm-1.2.3/src/x11/window-x11.c:1917:14: style: Condition 'region!=NULL' is always false [knownConditionTrueFalse] ukwm-1.2.3/src/x11/window-x11.c:1880:28: note: Assignment 'region=NULL', assigned value is 0 ukwm-1.2.3/src/x11/window-x11.c:1917:14: note: Condition 'region!=NULL' is always false Explanation: region starts as NULL, but inside 'if (META_DISPLAY_HAS_SHAPE(...))' it is assigned from region_create_from_x_rectangles() when rects is non-null. rects in turn depends on the unknown bounding_shaped and the unknown XShapeGetRectangles result. So region can be non-NULL at line 1917, and the 'always false' warning in main was a false positive. The PR handles paths that split inside a block more accurately, so removing this warning fixes that false positive. ---- 273 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vkd3d/vkd3d_2.1+ds.orig.tar.xz Result: your vkd3d-2.1/libs/vkd3d/utils.c:431:15: warning:inconclusive: Possible null pointer dereference: device [nullPointer] vkd3d-2.1/libs/vkd3d/utils.c:532:43: note: Calling function 'vkd3d_get_format', 1st argument 'NULL' value is 0 vkd3d-2.1/libs/vkd3d/utils.c:453:42: note: Assuming condition is false vkd3d-2.1/libs/vkd3d/utils.c:462:50: note: Calling function 'vkd3d_get_depth_stencil_format', 1st argument 'device' value is 0 vkd3d-2.1/libs/vkd3d/utils.c:431:15: note: Null pointer dereference Explanation: The new warning says `vkd3d_get_format(NULL, ...)` (called at line 532) reaches `vkd3d_get_depth_stencil_format(device, ...)` at line 462 and dereferences `device` at line 431. That path needs the lookup loop at lines 451-455 to find no matching format. A caller passing a NULL device in vkd3d relies on the format being in the static `vkd3d_formats` table, so the loop returns early and line 462 is never reached. The `VKD3D_ASSERT(device)` also shows that NULL is not expected there. Cppcheck cannot know how the loop over the table ends, so 'Assuming condition is false' is a guess. The warning is likely a false positive, and it shows up because the PR's path splitting now carries the NULL value past an if with an early return. The caller at line 532 is not shown, so confidence is medium. ---- 274 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vlc/vlc_3.0.24.orig.tar.xz Result: main vlc-3.0.24/modules/demux/adaptive/SegmentTracker.cpp:284:21: warning: Uninitialized variables: temp.init_sent, temp.init_sent, temp.index_sent, temp.index_sent [uninitvar] vlc-3.0.24/modules/demux/adaptive/SegmentTracker.cpp:274:25: note: Assuming condition is true vlc-3.0.24/modules/demux/adaptive/SegmentTracker.cpp:280:41: note: Assuming condition is true vlc-3.0.24/modules/demux/adaptive/SegmentTracker.cpp:284:21: note: Uninitialized variables: temp.init_sent, temp.init_sent, temp.index_sent, temp.index_sent Explanation: This removed line is paired with a new one at the same location (284:21). The PR only changed the wording of the same uninitvar warning. The old text listed temp.init_sent and temp.index_sent twice each and had an extra 'Assuming condition is true' note at line 280. The new text lists each member once and drops that note. In VLC, `Position temp;` uses Position's default constructor, which likely sets init_sent and index_sent to false; the constructor body is not shown here. If so, the warning is a false positive in both versions. Removing the duplicated names is cosmetic and does not change whether users get a correct report. ---- 275 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/v/vlc/vlc_3.0.24.orig.tar.xz Result: main vlc-3.0.24/modules/demux/mpeg/ts_si.c:463:17: style: Condition 'b_appending' is always true [knownConditionTrueFalse] vlc-3.0.24/modules/demux/mpeg/ts_si.c:422:17: note: Assuming that condition '!b_appending' is not redundant vlc-3.0.24/modules/demux/mpeg/ts_si.c:454:17: note: Assuming condition is false vlc-3.0.24/modules/demux/mpeg/ts_si.c:463:17: note: Condition 'b_appending' is always true Explanation: Line 463 is reached on two kinds of paths. If `!b_appending` is true (line 422), the block falls through after `psz_key` is converted successfully; it only leaves via break or continue on the error paths. If `b_appending` is true, the else-if at line 448 continues only when `ppsz_prev == NULL`. So at line 463 `b_appending` can be either true or false, and 'always true' was a false positive. Main treated the `!b_appending` block as always escaping because one of its inner paths hits continue/break. The PR tracks per-path termination and sees that some paths through the block reach its end, so the false positive is gone. ---- 276 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vlc/vlc_3.0.24.orig.tar.xz Result: your vlc-3.0.24/modules/codec/wmafixed/wmafixed.c:209:16: portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] vlc-3.0.24/modules/codec/wmafixed/wmafixed.c:189:9: note: Assignment 'x=cordic_circular_gain', assigned value is -1304065735 vlc-3.0.24/modules/codec/wmafixed/wmafixed.c:194:11: note: Assuming condition is false vlc-3.0.24/modules/codec/wmafixed/wmafixed.c:198:18: note: Assuming condition is true vlc-3.0.24/modules/codec/wmafixed/wmafixed.c:209:16: note: Shifting a negative value is technically undefined behaviour Explanation: `x` is set from `cordic_circular_gain`, which is an unsigned constant 0xb2458939 stored in an int32_t, so it is negative (-1304065735). In the middle branch (z in the third quadrant, line 198) `x` is not negated. It therefore stays negative when `x >> 0` runs at line 209 on the first loop iteration. The value-flow path is correct, and this is the case the shiftNegativeLHS check is meant to report. It is arguably a weak finding: right-shifting a negative value is implementation-defined, not undefined. Still, it matches the checker's design and reflects real data flow that main missed, so it is a new true positive. ---- 277 / 291 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vlc/vlc_3.0.24.orig.tar.xz Result: your vlc-3.0.24/modules/demux/adaptive/SegmentTracker.cpp:284:21: warning: Uninitialized variables: temp.init_sent, temp.index_sent [uninitvar] vlc-3.0.24/modules/demux/adaptive/SegmentTracker.cpp:274:25: note: Assuming condition is true vlc-3.0.24/modules/demux/adaptive/SegmentTracker.cpp:284:21: note: Uninitialized variables: temp.init_sent, temp.index_sent Explanation: Both main and the PR report the same uninitvar warning at line 284 for `temp.isValid()`. Only the wording changed: the duplicated variable names and the extra 'Assuming condition' note at line 280 are gone. `Position temp;` is default-constructed, and VLC's Position constructor initializes `init_sent` and `index_sent`. So the warning looks like a false positive in both versions. The PR neither removes nor adds it; it only makes the text slightly tidier. That has no real effect for users. ---- 278 / 291 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vlc/vlc_3.0.24.orig.tar.xz Result: your vlc-3.0.24/modules/gui/skins2/controls/ctrl_tree.cpp:528:9: style: Condition 'needShow' is always false [knownConditionTrueFalse] vlc-3.0.24/modules/gui/skins2/controls/ctrl_tree.cpp:230:21: note: Assignment 'needShow=false', assigned value is 0 vlc-3.0.24/modules/gui/skins2/controls/ctrl_tree.cpp:489:52: note: Assuming condition is true vlc-3.0.24/modules/gui/skins2/controls/ctrl_tree.cpp:528:9: note: Condition 'needShow' is always false Explanation: `needShow` starts as false at line 230 and is presumably set to true in the earlier key-handling branches of this if/else-if chain (lines 230–488). The warning depends on 'Assuming condition is true' at line 489, the scroll branch. That path does not set `needShow`, so it is false only there, not on every path. Reporting 'always false' for the check at line 528 is wrong: the PR's new path splitting let a value that holds on one path leak out as a known value, which is a new false positive. ---- 279 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/x/x42-plugins/x42-plugins_20260908+ds.orig.tar.xz Result: main x42-plugins-20260908/midimap.lv2/src/midimap.c:1071:6: style: Condition '!loaded' is always true [knownConditionTrueFalse] x42-plugins-20260908/midimap.lv2/src/midimap.c:1026:16: note: Assignment 'loaded=false', assigned value is 0 x42-plugins-20260908/midimap.lv2/src/midimap.c:1071:6: note: Condition '!loaded' is always true Explanation: `loaded` starts as false (line 1026), but line 1048 sets it to true when `cfg_version > 0`. `cfg_version` starts at 0 and is passed by address to `parse_config_line(self, line, &cfg_version, lineno)` inside the while loop, so it can be non-zero after the loop. `loaded` can therefore be true at line 1071, and main's claim that '!loaded' is always true is a false positive. The PR changes how paths that part inside blocks are joined, and no longer treats the assignment value as known past the conditional code, so removing the warning is correct. ---- 280 / 291 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/x/x86info/x86info_1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f.orig.tar.gz Result: your AMD/dumppsb.c:68:14: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] AMD/dumppsb.c:57:10: note: Assuming allocation function fails AMD/dumppsb.c:57:10: note: Assignment 'p=mmap(NULL,(0x000ffff0L-0x000c0000L)+1,PROT_READ,MAP_SHARED,fd,0x000c0000L)', assigned value is 0 AMD/dumppsb.c:68:14: note: Null pointer dereference Explanation: On failure, mmap() returns MAP_FAILED ((void*)-1), not NULL, and the code checks for exactly that at line 58 and returns. The premise 'allocation fails → p is 0' does not hold for mmap, so the dereference at line 68 cannot be a null dereference caused by a failed allocation. The PR's changed path handling now lets the null value reach line 68, which adds a false positive. ---- 281 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/x/xastir/xastir_2.2.4.orig.tar.gz Result: main Xastir-Release-2.2.4/Davis/src/db2APRS.c:245:19: error: Uninitialized variable: pbuf [legacyUninitvar] Explanation: This is a real bug. On the path where `valid_data_flgs & VALID_WINDDIR` is set and `intval < 0` (or `> 360`), the code writes "c..." into APRS_buf instead of pbuf. pbuf is then still uninitialized when `strcat(APRS_buf, pbuf)` runs at line 245. The removed legacyUninitvar error is not lost: the PR reports the same issue as a valueflow-based uninitvar warning. The new message comes with the correct path notes (conditions at 211 and 222 assumed true). The finding is kept and explained better, and warning severity fits a defect that depends on a runtime condition. ---- 282 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/x/xastir/xastir_2.2.4.orig.tar.gz Result: main Xastir-Release-2.2.4/src/cad_objects.c:634:12: style: Condition 'area<0.0' is always false [knownConditionTrueFalse] Xastir-Release-2.2.4/src/cad_objects.c:538:11: note: Assignment 'area=0.0', assigned value is 0.0 Xastir-Release-2.2.4/src/cad_objects.c:634:12: note: Condition 'area<0.0' is always false Explanation: `area` starts at 0.0, but inside the preceding block the loop adds signed Green's-theorem terms (`area += dx0*dy1 - dx1*dy0`, where dx/dy can be negated) and then scales it by 0.5. So `area` can be negative at line 634, and the `if (area < 0.0) area = -area;` check is meaningful. The removed 'always false' warning was a false positive. The PR's better handling of paths that are modified on some branches and not others no longer keeps the stale 0.0 as known after the block. ---- 283 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/x/xastir/xastir_2.2.4.orig.tar.gz Result: main Xastir-Release-2.2.4/src/maps.c:7305:31: style: Condition '!done' is always true [knownConditionTrueFalse] Xastir-Release-2.2.4/src/maps.c:7261:14: note: Assignment 'done=0', assigned value is 0 Xastir-Release-2.2.4/src/maps.c:7271:8: note: Assuming condition is false Xastir-Release-2.2.4/src/maps.c:7305:31: note: Condition '!done' is always true Explanation: `done` starts at 0, but the loop body runs `done++` when a match is found, specifically so that the `while ((current != NULL) && !done)` condition ends the loop. `!done` is therefore false on later evaluations, so 'always true' was a false positive. The PR tracks the paths through the earlier conditions more precisely, and removing this warning fixes the false positive. ---- 284 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/x/xastir/xastir_2.2.4.orig.tar.gz Result: main Xastir-Release-2.2.4/src/xa_config.c:208:14: style: Condition '!option_found' is always true [knownConditionTrueFalse] Xastir-Release-2.2.4/src/xa_config.c:191:12: note: Assuming that condition '!option_found' is not redundant Xastir-Release-2.2.4/src/xa_config.c:208:14: note: Condition '!option_found' is always true Explanation: Line 208 is the inner `while` condition `!option_found && fgets(...)`. `option_found` is 0 when the inner loop is first entered, but the loop body sets `option_found = 1` at line 221 once the option line is found. The condition is then evaluated again and becomes false, which is how the loop ends after a match. So 'always true' was a false positive. The PR stops reporting it. ---- 285 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/x/xastir/xastir_2.2.4.orig.tar.gz Result: your Xastir-Release-2.2.4/Davis/src/db2APRS.c:245:19: warning: Uninitialized variable: pbuf [uninitvar] Xastir-Release-2.2.4/Davis/src/db2APRS.c:211:23: note: Assuming condition is true Xastir-Release-2.2.4/Davis/src/db2APRS.c:222:21: note: Assuming condition is true Xastir-Release-2.2.4/Davis/src/db2APRS.c:245:19: note: Uninitialized variable: pbuf Explanation: pbuf is only written in some branches. When VALID_WINDDIR is set and intval < 0 (or > 360), the code writes into APRS_buf instead of pbuf. strcat(APRS_buf, pbuf) at line 245 then reads uninitialized pbuf, so this is a real bug. Main reported it only through the legacy checker (legacyUninitvar), with no path. The PR reports the same true positive through the value-flow uninitvar check, with a correct path (211 true, 222 true). The bug is still found, and the message now shows the concrete path that leads to it, which makes it more accurate. ---- 286 / 291 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/x/xrdp/xrdp_0.10.6.1.orig.tar.gz Result: main xrdp-0.10.6.1/librfxcodec/src/rfxencode.c:167:12: style: Condition 'cx&(1<<23)' is always false [knownConditionTrueFalse] xrdp-0.10.6.1/librfxcodec/src/rfxencode.c:144:10: note: Assignment 'cx=0', assigned value is 0 xrdp-0.10.6.1/librfxcodec/src/rfxencode.c:167:12: note: Condition 'cx&(1<<23)' is always false Explanation: In the non-accelerated preprocessor configuration, line 144 sets cx = 0, and nothing changes cx before line 167. The bodies at lines 152-166 only call printf and set enc fields. So 'cx & (1<<23)' really is always false there, and main's warning was a true positive for that configuration. The neighbouring checks on lines 152, 157 and 162 are not in the diff, so they are presumably still reported. The PR has lost the known value of cx after several skipped ifs, which is a new false negative. Users may see this warning as configuration-dependent noise, so losing it costs little. ---- 287 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/x/xrootd/xrootd_6.2.1.orig.tar.gz Result: main xrootd-6.2.1/src/XrdCms/XrdCmsCluster.cc:223:4: warning: Either the condition '!nP' is redundant or there is possible null pointer dereference: nP. [nullPointerRedundantCheck] xrootd-6.2.1/src/XrdCms/XrdCmsCluster.cc:193:8: note: Assuming that condition '!nP' is not redundant xrootd-6.2.1/src/XrdCms/XrdCmsCluster.cc:223:4: note: Null pointer dereference Explanation: The PR removed a false positive. Inside the `if (!nP)` block (lines 193–219), every path that does not return assigns `nP = new XrdCmsNode(...)` at line 215. The only path where that object is deleted also returns at line 218. So `nP` cannot be null at line 223, and the condition `!nP` is not evidence of a null dereference there. The old nullPointerRedundantCheck warning was wrong. ---- 288 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/x/xrootd/xrootd_6.2.1.orig.tar.gz Result: main xrootd-6.2.1/src/XrdFrm/XrdFrmFiles.cc:190:8: style: Condition '!What' is always true [knownConditionTrueFalse] xrootd-6.2.1/src/XrdFrm/XrdFrmFiles.cc:172:23: note: Assignment 'What=0', assigned value is 0 xrootd-6.2.1/src/XrdFrm/XrdFrmFiles.cc:190:8: note: Condition '!What' is always true Explanation: 'What' starts as 0, but the block at line 176 either returns or sets 'What = "No base file for"' before falling through. So at line 190 'What' can be non-null, and '!What' is not always true. The old warning was a false positive: main lost track of the path through the nested if/else-if/return chain that assigns 'What'. The PR now handles paths that partly return inside a block, which removes this false positive. ---- 289 / 291 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/z/ziproxy/ziproxy_3.3.2.orig.tar.bz2 Result: your ziproxy-3.3.2/src/qparser.c:91:19: style: Variable 'writepos2' can be declared as pointer to const [constVariablePointer] Explanation: The excerpt only shows the declaration of 'writepos2' on line 91, not how it is used further down the function, so I cannot tell whether anything is written through it. The same warning newly appears in two files with the same code pattern. This PR changes forward value-flow path handling, which should not normally affect the constVariablePointer check. That makes a new false positive possible, for example if a write through writepos2 now sits in a branch treated as unreachable. It could also be a correct finding that main missed. Without the later code this cannot be decided. ---- 290 / 291 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/z/ziproxy/ziproxy_3.3.2.orig.tar.bz2 Result: your ziproxy-3.3.2/src/txtfiletools.c:142:19: style: Variable 'writepos2' can be declared as pointer to const [constVariablePointer] Explanation: In remove_junk_data(), 'writepos2' is only assigned from 'writepos' (line 171). In the code shown it is never dereferenced or written through; all writes go through 'writepos'. Declaring it 'const char *writepos2' would therefore compile and is correct, so the new constVariablePointer warning looks like a true positive. The same pattern is reported in the copied code in qparser.c. Confidence is not high because the rest of the function after line 182 is not shown. ---- 291 / 291 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/z/zypper/zypper_1.14.101.orig.tar.gz Result: main zypper-1.14.101/src/commands/services/refresh.cc:113:29: style: Condition 'specified.empty()' is always true [knownConditionTrueFalse] zypper-1.14.101/src/commands/services/refresh.cc:89:28: note: Assuming that condition 'specified.empty()' is not redundant zypper-1.14.101/src/commands/services/refresh.cc:108:12: note: Assuming condition is true zypper-1.14.101/src/commands/services/refresh.cc:113:29: note: Condition 'specified.empty()' is always true Explanation: At line 89, when `specified` is non-empty, the block only `continue`s if `found` stays false. When an alias matches, `found` is set to true and execution falls through to line 108 with `specified` still non-empty. So `specified.empty()` at line 113 can be false, and main's 'always true' warning was a false positive. Main treated the block at 89 as always escaping because it followed only the path where `found` stays false. The PR tracks that some paths through the block do reach its end (Terminate::Partial), which removes this false positive. This matches the #15264 test cases added in the PR.