{ "tokens": { "input": 141845, "cache_read": 3084480, "cache_write": 771120, "output": 22705 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/a/a2ps/a2ps_4.15.8.orig.tar.gz", "main parsessh.c:2344:18: style: Condition '0<=yyi' is always true [knownConditionTrueFalse]\n parsessh.c:2343:36: note: Assignment 'yyi=yypgoto[yylhs]+*yyssp', assigned value is greater than -1\n parsessh.c:2344:18: note: Condition '0<=yyi' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "This is Bison-generated parser code. `yyi = yypgoto[yylhs] + *yyssp` adds a signed table entry to a state number. Bison's `yypgoto` tables normally contain negative entries, which is exactly why the generated code guards with `0 <= yyi`. Main claimed the sum is always greater than -1, most likely from imprecise range or promotion inference on the narrow signed table types. The PR reworks integral promotion, cast ranges and range inference, and the warning disappears. Without the actual `yypgoto` table this cannot be fully verified, but the warning very likely was a false positive, so removing it is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/a/altermime/altermime_0.3.10.orig.tar.gz", "main altermime-0.3.10/mime_alter.c:2341:8: style: Condition 'qp_data' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Only the output format changed here. The same warning is still reported, and it now comes with notes pointing to the earlier 'qp_data == NULL' check at line 2332. The warning itself is correct: that check returns when qp_data is NULL, so 'if (qp_data)' at line 2341 is always true. The added note gives more useful context, so the message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/a/astrometry.net/astrometry.net_0.98+dfsg.orig.tar.xz", "your astrometry.net-0.98/util/an-opts.c:37:17: style: Condition '!opt->help' is always false [knownConditionTrueFalse]\n astrometry.net-0.98/util/an-opts.c:25:16: note: Assuming that condition 'opt->help' is not redundant\n astrometry.net-0.98/util/an-opts.c:37:17: note: Condition '!opt->help' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself is unchanged and still a true positive. Inside `if (opt->help)` the check `if (!opt->help) continue;` at line 37 is always false, because `opt->help` is not modified in between (only fprintf calls run). The only difference is that the new output adds error-path notes pointing to the governing condition at line 25. That makes the message more informative for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/b/bomberclone/bomberclone_0.11.9.orig.tar.gz", "your bomberclone-0.11.9/src/packets.c:415:13: style: Condition 'GT_MP_PTPM' is always true [knownConditionTrueFalse]\n bomberclone-0.11.9/src/packets.c:412:14: note: Assuming that condition 'GT_MP_PTPM' is not redundant\n bomberclone-0.11.9/src/packets.c:415:13: note: Condition 'GT_MP_PTPM' is always true" ], "verdict": { "verdict": "improvement", "confidence": "low", "explanation": "The warning is a true positive. Line 415 re-checks `GT_MP_PTPM` inside the `else if` branch that line 412 entered only because `GT_MP_PTPM` was already true, so the inner check is always true. Only the error-path notes changed. The new notes point at the right premise: the line 412 condition, then the line 415 check. This fits the PR's `addErrorPath` change, which drops assumptions about conditions unrelated to the tracked value. Main's original notes are not shown, so I cannot confirm what they looked like. The new path is accurate, so this is likely a small improvement in message quality." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/cal3d/cal3d_0.11.0.orig.tar.gz", "main cal3d-0.11.0/src/cal3d/tinyxmlparser.cpp:378:11: warning: Either the condition 'p' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]\n cal3d-0.11.0/src/cal3d/tinyxmlparser.cpp:335:14: note: Assuming that condition 'p' is not redundant\n cal3d-0.11.0/src/cal3d/tinyxmlparser.cpp:332:4: note: Assuming condition is true\n cal3d-0.11.0/src/cal3d/tinyxmlparser.cpp:378:11: note: Null pointer addition" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both versions report the same nullPointerArithmeticRedundantCheck at line 378, which comes from the `p &&` check in the loop at line 335. The only change is that the PR drops the intermediate note 'Assuming condition is true' at line 332:4. That `if` most likely tests whitespace-trimming flags (line 332 is not shown) and does not involve `p`. The note only said which branch was taken, and the remaining note at line 335 already sits inside that branch. The warning, its location and its key evidence are unchanged, so this does not matter much to users either way." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/charmtimetracker/charmtimetracker_1.12.0.orig.tar.gz", "main Charm-1.12.0/Charm/Widgets/TimeTrackingView.cpp:215:22: style: Condition 'position>=0' is always true [knownConditionTrueFalse]\n Charm-1.12.0/Charm/Widgets/TimeTrackingView.cpp:207:18: note: Assuming that condition 'position<0' is not redundant\n Charm-1.12.0/Charm/Widgets/TimeTrackingView.cpp:211:9: note: Assuming condition is false\n Charm-1.12.0/Charm/Widgets/TimeTrackingView.cpp:214:9: note: Assuming condition is true\n Charm-1.12.0/Charm/Widgets/TimeTrackingView.cpp:215:22: note: Condition 'position>=0' is always true" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The warning is a true positive in both versions: after `if (position < 0) return;` the check `position >= 0` at line 215 is always true. The only change is the error path. It no longer includes the notes about the unrelated conditions `taskIsValidAndTrackable` (line 211) and `isTracking` (line 214). The PR's addErrorPath change filters out conditions that do not reference the tracked value. Those notes were irrelevant to why the condition is always true, so the message is now more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/csound/csound_6.18.1+dfsg.orig.tar.xz", "your csound-6.18.1/Engine/envvar.c:705:9: style: Condition 'tempPath' is always true [knownConditionTrueFalse]\n csound-6.18.1/Engine/envvar.c:702:18: note: Assuming that condition 'tempPath==NULL' is not redundant\n csound-6.18.1/Engine/envvar.c:705:9: note: Condition 'tempPath' is always true" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Line 702 returns early when tempPath is NULL, so the check of tempPath at line 705 is always true. Both main and the PR report this true positive. The only change is that the PR's version now carries an error-path note pointing to the 'tempPath==NULL' check at line 702. That note is accurate, but the warning text, location and correctness are the same. The difference is cosmetic." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dde-calendar/dde-calendar_6.6.7.orig.tar.gz", "main linuxdeepin-dde-calendar-21b278b/src/calendar-client/src/view/cgraphicsscene.cpp:153:34: style: Condition 'currentFocusItem==nullptr' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both main and the PR report the same warning at line 153 with identical text. Only the attached notes differ, and the PR version's notes still point to the condition at line 142 as the source. The warning itself is likely a false positive: `m_keyPrxy->keyPressDeal(Qt::Key_Tab)` runs between the outer check and line 153 and can plausibly reset the member `currentFocusItem` to nullptr. The PR neither fixes nor worsens that, so the change does not matter to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/deepin-terminal/deepin-terminal_6.5.41+dfsg.orig.tar.xz", "your deepin-terminal-6.5.41/src/main/mainwindow.cpp:1126:27: style: Condition 'runningCount!=0' is always true [knownConditionTrueFalse]\n deepin-terminal-6.5.41/src/main/mainwindow.cpp:1123:49: note: Assuming that condition 'runningCount!=0' is not redundant\n deepin-terminal-6.5.41/src/main/mainwindow.cpp:1126:27: note: Condition 'runningCount!=0' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 1126 sits inside a block guarded by `runningCount != 0` at line 1123, so the inner `runningCount != 0` is always true. Both main and the PR report this true positive. The only change is that the PR's version now has notes pointing to the condition at line 1123, which explains why the warning holds. A clearer error path for the same true positive is a small improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/e/ecasound/ecasound_2.9.3.orig.tar.gz", "main ecasound-2.9.3/ecatools/ecalength.c:175:16: style: Condition 'opts.script' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The line at 175 checks `opts.script` inside the else branch of `if (!opts.script)`, so the condition really is always true and the warning is a true positive. The warning still appears in the PR output with the same text. Only the reported context changed: it now carries a note pointing to line 137 ('Assuming that condition '!opts.script' is not redundant'). That note names the condition that makes this one redundant, so the diagnostic is more informative. The same pattern appears in the other two diffs for this package." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/e/ecasound/ecasound_2.9.3.orig.tar.gz", "your ecasound-2.9.3/libecasound/audioio-raw.cpp:91:53: style: Condition 'label().at(0)=='-'' is always false [knownConditionTrueFalse]\n ecasound-2.9.3/libecasound/audioio-raw.cpp:87:48: note: Assuming that condition 'label().at(0)=='-'' is not redundant\n ecasound-2.9.3/libecasound/audioio-raw.cpp:91:53: note: Condition 'label().at(0)=='-'' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 87 tests `label().at(0) == '-'`. If that is true, the first branch is taken, so in the else-if on line 91 the same subexpression must be false. The warning text is unchanged in both versions. The PR only adds error-path notes (\"Assuming that condition ... is not redundant\" at line 87) that point to the earlier check. That gives the user context and makes the diagnostic easier to understand. The warning was already a true positive, and the added explanation is a small improvement in message quality." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/e/endless-sky/endless-sky_0.11.4.orig.tar.gz", "your endless-sky-endless-sky-406661e/source/AI.cpp:1861:5: style: Condition 'parent' is always true [knownConditionTrueFalse]\n endless-sky-endless-sky-406661e/source/AI.cpp:1857:5: note: Assuming that condition '!parent' is not redundant\n endless-sky-endless-sky-406661e/source/AI.cpp:1861:5: note: Condition 'parent' is always true" ], "verdict": { "verdict": "neutral", "confidence": "high", "explanation": "Both main and the PR report the same true positive at line 1861. After the `if(!parent) return false;` at line 1857, `parent` is always non-null, so the `parent &&` check at line 1861 is redundant. Only the line pairing changed in the diff output; the warning text and notes are identical, so nothing changes for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/f/flare-engine/flare-engine_1.15.orig.tar.gz", "your flare-engine-1.15/src/Widget.cpp:383:4: style: Variable 'next' is assigned an expression that holds the same value. [redundantAssignment]\n flare-engine-1.15/src/Widget.cpp:380:11: note: Assuming that condition 'next==current' is not redundant\n flare-engine-1.15/src/Widget.cpp:383:4: note: Variable 'next' is assigned an expression that holds the same value." ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The redundantAssignment warning at line 383 is unchanged and is a true positive: inside `if (next == current)`, `next = current;` assigns the value `next` already holds. Only the error path differs. The note 'Assuming condition is true' at 382:42 is gone because the PR now skips recording conditions that do not mention the tracked value. That condition (`!is_inner_tablist && !next_tablist && !prev_tablist`) does not involve `next`. It only says how line 383 is reached and is not why the assignment is redundant. The remaining note on `next==current` still explains the warning. Dropping the extra note neither helps nor hurts users much." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/h/hacktv/hacktv_0+git20260515+ds.orig.tar.xz", "your hacktv-0+git20260515+ds/src/rf_fl2k.c:159:31: style: Condition 'samples>0' is always true [knownConditionTrueFalse]\n hacktv-0+git20260515+ds/src/rf_fl2k.c:147:16: note: Assuming that condition 'samples>0' is not redundant\n hacktv-0+git20260515+ds/src/rf_fl2k.c:159:31: note: Condition 'samples>0' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Both versions report the same warning; only the error path changed. Main included the note \"Assuming condition is true\" at line 151, which is the unrelated check `if(rf->audio_mode == FL2K_AUDIO_STEREO)` and has nothing to do with `samples`. The PR's addErrorPath filter now drops assumptions about conditions that do not reference the tracked value, so this misleading note is gone. The warning itself looks like a false positive in both versions: `samples--` inside the loop can make `samples > 0` false on later iterations. That did not change, but the message as reported is now more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/h/hacktv/hacktv_0+git20260515+ds.orig.tar.xz", "your hacktv-0+git20260515+ds/src/videocrypt10-ca.c:167:28: error: Array 'SIGNATURE_TABLE[512]' accessed at index 4095, which is out of bounds. [arrayIndexOutOfBounds]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The loop bound is `sizeof(SIGNATURE_TABLE)`, the size in bytes (512 entries \u00d7 8 bytes = 4096), not the element count. So `i` really does reach 4095 and `SIGNATURE_TABLE[i]` reads out of bounds. The warning is a true positive in both versions, with the same text, location and value. The only change is that the PR drops the note 'Assuming that condition istyle`. `item` is a copy of `obj` (line 1798), so `!item` at line 1799 is always false. The warning is a true positive and is reported by both main and your. Only the error-path notes differ slightly: the new run adds or keeps the note 'item is assigned obj here', which is consistent with main's output for the same line. The message is unchanged and still correct." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/i/istgt/istgt_0.4~20111008.orig.tar.gz", "your istgt-20111008/src/istgt_lu_disk.c:2678:13: style: Condition 'prkey==NULL' is always false [knownConditionTrueFalse]\n istgt-20111008/src/istgt_lu_disk.c:2677:11: note: Assignment 'prkey=&spec->pr_keys[i]', assigned value is never 0\n istgt-20111008/src/istgt_lu_disk.c:2678:13: note: Condition 'prkey==NULL' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself is unchanged and correct: `prkey = &spec->pr_keys[i]` is the address of an array element, so `prkey == NULL` is always false. The only difference is that the warning now carries notes: an assignment note explaining why the value is never null, and the condition note. This makes the message more informative and accurate for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/k/kdelibs4support/kdelibs4support_5.103.0.orig.tar.xz", "main kdelibs4support-5.103.0/src/kdeui/kpixmapcache.cpp:1376:20: style: Condition 'size()>(int)(d->mCacheLimit)' is always true [knownConditionTrueFalse]\n kdelibs4support-5.103.0/src/kdeui/kpixmapcache.cpp:1374:34: note: Assuming that condition 'size()>d->mCacheLimit' is not redundant\n kdelibs4support-5.103.0/src/kdeui/kpixmapcache.cpp:1376:20: note: Condition 'size()>(int)(d->mCacheLimit)' is always true" ], "verdict": { "verdict": "acceptable regression", "confidence": "low", "explanation": "Line 1374 already established `size() > d->mCacheLimit`. Line 1376 repeats the same test with only a cast added; the original 1.2 factor seems to have been dropped from this version. Nothing between the two tests (`lock.unlock()`) visibly changes `size()` or `mCacheLimit`, so the inner check is effectively redundant and main's warning looks like a real redundant-condition finding. The PR makes Cppcheck more conservative with casts and mixed-sign comparisons, so it no longer proves the inner condition. The only way the warning could be wrong is if `size()` changed after unlocking, or if `mCacheLimit` were unsigned and `size()` returned a negative value; neither seems realistic here. This is most likely a lost true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/l/latte-int/latte-int_1.7.6+ds.orig.tar.xz", "main latte-int-1.7.6/code/latte/minimize.cpp:480:19: style: Condition 'Singlecone[0]=='y'' is always false [knownConditionTrueFalse]\n latte-int-1.7.6/code/latte/minimize.cpp:469:21: note: Assuming that condition 'Singlecone[0]=='n'' is not redundant\n latte-int-1.7.6/code/latte/minimize.cpp:475:34: note: Assuming condition is false\n latte-int-1.7.6/code/latte/minimize.cpp:480:19: note: Condition 'Singlecone[0]=='y'' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself is correct in both versions. Line 480 sits inside `if(Singlecone[0] == 'n')`, and nothing in between modifies Singlecone, so `Singlecone[0]=='y'` is always false. The only change is that the error path dropped the note \"Assuming condition is false\" for line 475 (`IsZero(NumOfLatticePoints) == 1`). That condition is unrelated to Singlecone, so the note pointed at an irrelevant condition. The PR's addErrorPath change filters out such notes. The resulting message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/l/latte-int/latte-int_1.7.6+ds.orig.tar.xz", "your latte-int-1.7.6/code/latte/maximize.cpp:477:19: style: Condition 'Singlecone[0]=='y'' is always false [knownConditionTrueFalse]\n latte-int-1.7.6/code/latte/maximize.cpp:466:21: note: Assuming that condition 'Singlecone[0]=='n'' is not redundant\n latte-int-1.7.6/code/latte/maximize.cpp:477:19: note: Condition 'Singlecone[0]=='y'' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Inside the `if(Singlecone[0] == 'n')` branch, testing `Singlecone[0] == 'y'` is really always false, so the warning is a true positive in both versions. The only change is in the error path. Main included an irrelevant note, 'Assuming condition is false', pointing at line 472 (`IsZero(NumOfLatticePoints) == 1`), a condition that has nothing to do with Singlecone. The PR's addErrorPath change drops notes for conditions that don't mention the tracked value. The new path holds just the relevant assumption and the conclusion, which makes the message more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/l/lwip/lwip_2.2.1+dfsg1.orig.tar.xz", "your lwip-2.2.1/src/netif/bridgeif_fdb.c:167:12: style: Condition 'e->used' is always true [knownConditionTrueFalse]\n lwip-2.2.1/src/netif/bridgeif_fdb.c:164:10: note: Assuming that condition 'e->used' is not redundant\n lwip-2.2.1/src/netif/bridgeif_fdb.c:167:12: note: Condition 'e->used' is always true" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both main and the PR report the same 'e->used is always true' warning at line 167. Only the attached notes differ, and the PR's notes correctly point to the outer check at line 164. The warning itself is unchanged: the inner check is a deliberate re-check after taking the lock, and it looks always true only because the protect macros carry no visible side effects. Users see essentially the same message either way." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/l/lzip/lzip_1.26.orig.tar.xz", "your lzip-1.26/lzip_index.cc:233:26: style: Comparing expression of type 'const signed long long' against value 9223372036854775807. Condition is always false. [compareValueOutOfTypeRangeError]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`end` is a `const long long`, and `INT64_MAX` is exactly that type's maximum, so `end > INT64_MAX` can never be true. The warning points at the `INT64_MAX` operand and correctly says the comparison is always false. Before the PR the check skipped 64-bit types (`bits >= 63`), so this was missed; the PR now handles them. This is a new true positive: the subcondition is redundant defensive code." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libm/libmath-prime-util-gmp-perl/libmath-prime-util-gmp-perl_0.54.orig.tar.gz", "main Math-Prime-Util-GMP-0.54/bls75.c:1096:11: style: Condition 'testr2' is always true [knownConditionTrueFalse]\n Math-Prime-Util-GMP-0.54/bls75.c:1093:22: note: Assuming that condition '!testr2' is not redundant\n Math-Prime-Util-GMP-0.54/bls75.c:1095:11: note: Assuming condition is true\n Math-Prime-Util-GMP-0.54/bls75.c:1092:43: note: Assignment 'testr2=mpz_cmp_ui(R2,tf*tf)>=0', assigned value is less than 2\n Math-Prime-Util-GMP-0.54/bls75.c:1093:19: note: Assuming condition is false\n Math-Prime-Util-GMP-0.54/bls75.c:1096:11: note: Condition 'testr2' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning is a true positive in both versions. After `if (!testr1 || !testr2) break;` the value of testr2 is nonzero, so `if (testr2)` at line 1096 is always true. The only difference is the error path: main included an irrelevant note 'Assuming condition is true' for line 1095 (`if (testr1)`), which says nothing about testr2. The PR's addErrorPath filter drops that unrelated note, so the explanation is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libo/libosl/libosl_0.8.0.orig.tar.gz", "main libosl-0.8.0.orig/sample/rating/ratingstat.cc:577:21: style: Condition 'p' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both runs report the same knownConditionTrueFalse warning at line 577. `p` is checked at line 543 with an early return, so `p` is always true at line 577 and the warning is a true positive. The only difference is in the notes: the new output adds the error path note about the condition at line 543, which may come from the changed error-path handling. The warning itself is unchanged. The only possible gain is the clearer note, which does not matter much to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libx/libxpertmass/libxpertmass_1.18.1.orig.tar.gz", "main libxpertmass-1.18.1/source/XpertMassCore/src/CleavageAgent.cpp:557:16: style: Condition 'count!=1' is always true [knownConditionTrueFalse]\n libxpertmass-1.18.1/source/XpertMassCore/src/CleavageAgent.cpp:548:38: note: Assuming that condition 'iter_cleavage_site.length()<2' is not redundant\n libxpertmass-1.18.1/source/XpertMassCore/src/CleavageAgent.cpp:556:43: note: Assignment 'count=iter_cleavage_site.count(QChar('/'))', assigned value is greater than 1\n libxpertmass-1.18.1/source/XpertMassCore/src/CleavageAgent.cpp:557:16: note: Condition 'count!=1' is always true" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The PR removes a false positive. `iter_cleavage_site.count(QChar('/'))` counts how many '/' characters are in the string, so it can be 0, 1 or more. Knowing that `length() < 2` is false only tells us the string has at least 2 characters. It says nothing about how many '/' it contains. Main wrongly reused the length bound as the count's value and claimed it is 'greater than 1', which made `count != 1` look always true. The PR's infer/path changes stop that bogus bound from reaching `count`, so the false warning is gone." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/mfem/mfem_4.9+ds.orig.tar.xz", "main mfem-4.9+ds/general/tinyxml2.cpp:1103:35: style: Condition 'FirstChild()' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself did not go away. Only its text changed: main's version has no notes, and the PR's version (`your`) adds the error-path notes 'Assuming that condition FirstChild() is not redundant' (line 1101) and 'Condition FirstChild() is always true' (line 1103). In the code, `FirstChild()` is checked at line 1101 and checked again inside that branch at line 1103, so the redundant-condition warning is the same in both runs. The added notes explain why Cppcheck considers the condition always true, so the message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/mfem/mfem_4.9+ds.orig.tar.xz", "your mfem-4.9+ds/general/tinyxml2.cpp:1103:35: style: Condition 'FirstChild()' is always true [knownConditionTrueFalse]\n mfem-4.9+ds/general/tinyxml2.cpp:1101:31: note: Assuming that condition 'FirstChild()' is not redundant\n mfem-4.9+ds/general/tinyxml2.cpp:1103:35: note: Condition 'FirstChild()' is always true" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both versions report the same warning: `FirstChild() &&` at line 1103 sits inside `if (FirstChild())` at line 1101, so the check really is always true. This is a true positive. Only the attached error-path notes differ. The new notes point to the guarding condition on line 1101 and then to line 1103, which is accurate. The main version's notes are not shown, so there is no evidence the message got worse or noticeably better. The diagnostic users see is effectively unchanged." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/mtink/mtink_1.0.16.orig.tar.gz", "your mtink-1.0.16/mainSrc/ttink.c:736:23: style: Condition '*retBuf=='\\0'' is always false [knownConditionTrueFalse]\n mtink-1.0.16/mainSrc/ttink.c:734:30: note: Assuming that condition '*retBuf' is not redundant\n mtink-1.0.16/mainSrc/ttink.c:736:23: note: Condition '*retBuf=='\\0'' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 734 checks `retBuf != NULL && *retBuf`, so inside that block `*retBuf == '\\0'` on line 736 really is always false. The warning is a true positive in both runs. The only difference is that the new output adds error-path notes pointing at the `*retBuf` condition on line 734. That explains why the condition is always false, so the message is more informative and slightly more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/muparser/muparser_2.3.4.orig.tar.gz", "main beltoforion-muparser-59e0ce1/src/muParserInt.cpp:186:42: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]\n beltoforion-muparser-59e0ce1/src/muParserInt.cpp:182:23: note: Assignment 'iBits(sizeof(iVal)*8)', assigned value is 32\n beltoforion-muparser-59e0ce1/src/muParserInt.cpp:186:42: note: Shift" ], "verdict": { "verdict": "acceptable regression", "confidence": "medium", "explanation": "In `IsBinVal`, `iBits` is 32 and the loop starts at `i = 0`. On the first iteration with a leading '1', `(int)1 << ((iBits - 1) - i)` shifts a signed int by 31 bits. That is exactly the case `shiftTooManyBitsSigned` reports: undefined before C++14, implementation-defined after. So the main warning was a true positive. The PR now distrusts range values on the unsigned expression `(iBits - 1) - i` and no longer reports it. This is a lost true positive (a new false negative), not a removed false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/n/nemo/nemo_6.6.4.orig.tar.gz", "main nemo-6.6.4/libnemo-private/nemo-thumbnails.c:522:13: style: Condition '!data' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "high", "explanation": "The warning is reported by both main and your: the 'main' and 'your' lines for nemo-thumbnails.c:522 have the same text. The 'your' line only adds notes ('Assuming that condition ... is not redundant'), so the only change is extra error-path context. The warning itself is a true positive. The loop only runs while 'data = g_async_queue_try_pop(...)' is non-NULL, so '!data' inside the body is always false. Adding the error-path notes is at most a small help to users, and the diagnostic is essentially unchanged." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/n/nextcloud-desktop/nextcloud-desktop_35.0.0.orig.tar.gz", "your nextcloud-desktop-d52b4ca/src/libsync/vfs/cfapi/vfs_cfapi.cpp:625:46: style: Condition '!basePinState' is always false [knownConditionTrueFalse]\n nextcloud-desktop-d52b4ca/src/libsync/vfs/cfapi/vfs_cfapi.cpp:624:46: note: Assuming that condition '!basePinState' is not redundant\n nextcloud-desktop-d52b4ca/src/libsync/vfs/cfapi/vfs_cfapi.cpp:625:46: note: Condition '!basePinState' is always false" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The warning is reported by both main and the PR at the same location with the same text; only the note output may differ. The warning itself is a false positive in both versions. On line 625, `!basePinState` is only evaluated when `effectivePin` is set, because `||` short-circuits. Line 624 only rules out both optionals being empty at once, so `basePinState` can still be empty there and the condition is not always false. The PR neither removes nor introduces this false positive and does not change its message, so it makes no difference to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/o/opendkim/opendkim_2.11.0~beta2.orig.tar.gz", "main OpenDKIM-rel-opendkim-2-11-0-Beta2/libopendkim/tests/t-test64.c:83:10: style: Condition 'new==NULL' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Line 83 checks 'new == NULL' again after 'new' was already checked at line 79, which returns NULL in that case. The condition is therefore always false. This is a true positive and a copy-paste bug: the check should be on 'ptr'. The main warning is not lost. It is replaced by an equivalent 'your' warning with the same text that now includes an error path pointing to the earlier check at line 79. The message is more informative, so this counts as a small improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/pdfio/pdfio_1.6.5+dfsg.orig.tar.xz", "your pdfio-1.6.5/examples/mmd.c:1026:34: style: Condition 'stackptr->parent->type!=MMD_TYPE_CODE_BLOCK' is always true [knownConditionTrueFalse]\n pdfio-1.6.5/examples/mmd.c:1023:32: note: Assuming that condition 'stackptr->parent->type!=MMD_TYPE_CODE_BLOCK' is not redundant\n pdfio-1.6.5/examples/mmd.c:1026:34: note: Condition 'stackptr->parent->type!=MMD_TYPE_CODE_BLOCK' is always true" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The same warning appears on both sides. Line 1026 repeats the check `stackptr->parent->type != MMD_TYPE_CODE_BLOCK` from the enclosing condition on line 1023, so it really is always true, and both main and the PR report it. The 'your' version only adds the explanatory notes ('Assuming that condition ... is not redundant'), which is a cosmetic change in the error path, not in the finding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/procps/procps_4.0.7.orig.tar.xz", "main procps-4.0.7/src/pmap.c:351:8: style: Condition '!ret' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Inside the `while (ret != NULL)` loop, `ret` is never reassigned before line 351, because the `fgets` result on line 350 is discarded. So `!ret` really is always false. This is a true positive, and it points at a real bug: the code should have assigned `ret = fgets(...)`. Both versions report the same warning. The new one adds notes that trace the reasoning back to the loop condition `ret != NULL` on line 335. That makes the message more informative, and the diff is otherwise unchanged." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/pybigwig/pybigwig_0.3.25+dfsg.orig.tar.gz", "main pyBigWig-0.3.25/pyBigWig.c:1103:28: style: Condition 'values' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 100 returns early when 'values' is null, so 'values' really is always true at line 1103. The warning is a true positive both before and after the PR. The only difference is the error path: the new version adds notes ('Assuming that condition '!values' is not redundant', 'Assuming condition is false' at 1101/1102). Earlier main lines in the diff show no such notes, so main seems to have reported it without them. The finding is the same and the explanation is more complete, which makes this a small message-quality improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/python-srsly/python-srsly_2.5.2.orig.tar.xz", "main python-srsly-2.5.2/srsly/ujson/objToJSON.c:559:9: style: Condition 'exc' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "After `if (!exc) return;` on line 554, `exc` must be non-null at line 559, so 'Condition exc is always true' is a true positive in both versions. The warning text, location and id are unchanged. The diff shows up only because the attached notes differ: the PR changes how error-path notes are recorded. The new notes ('Assuming that condition !exc is not redundant' at 554) point to the correct reason. Main's notes are not shown, so there is no evidence the message became more or less accurate. Users see the same true-positive warning either way." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/r/r-cran-gap/r-cran-gap_1.15.3+dfsg.orig.tar.xz", "main gap/inst/ms/streec.c:557:30: warning: Either the condition 'seglst==NULL' is redundant or there is possible null pointer dereference: seglst. [nullPointerRedundantCheck]\n gap/inst/ms/streec.c:554:22: note: Assuming that condition 'seglst==NULL' is not redundant\n gap/inst/ms/streec.c:548:19: note: Assuming condition is true\n gap/inst/ms/streec.c:557:30: note: Null pointer dereference" ], "verdict": { "verdict": "neutral", "confidence": "high", "explanation": "The warning at line 557:30 is still reported after the PR. Only the error path changed: the note 'Assuming condition is true' at line 548 was dropped. In the code, seglst is reallocated and checked for NULL at line 554, but perror does not exit, so seglst[nsegs] at line 557 can be a NULL dereference. That makes the warning a true positive either way. The removed note pointed at an unrelated condition (nsegs >= seglimit) that only decides whether the realloc happens. Dropping it is at most a slight simplification of the message, and the warning's substance is unchanged." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/r/rt-tests/rt-tests_2.10.orig.tar.gz", "your rt-tests-2.10/src/cyclictest/cyclictest.c:2272:8: style: Condition '!shutdown' is always true [knownConditionTrueFalse]\n rt-tests-2.10/src/cyclictest/cyclictest.c:2265:7: note: Assuming that condition 'shutdown' is not redundant\n rt-tests-2.10/src/cyclictest/cyclictest.c:2272:8: note: Condition '!shutdown' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Both versions report the same warning at line 2272; only the error path differs. Main included the note 'Assuming condition is true' at line 2270, which is `if (refresh_on_max)`. That condition has nothing to do with `shutdown`. The PR's change to `addErrorPath` stops recording conditions that do not involve the tracked value, so the irrelevant note is dropped. The remaining path (the `shutdown || allstopped` break at 2265 followed by `!shutdown` at 2272) is the actual reasoning behind the warning. The warning itself is doubtful because `shutdown` is changed asynchronously by a signal handler and other threads, but that is unchanged by the PR. The message is now more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/segemehl/segemehl_0.3.4.orig.tar.xz", "main segemehl-0.3.4/libs/brendel.c:70:8: style: Condition 'a!=b' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "On line 70, 'a!=b' is always true because line 69 already returned when a==b. The warning is a true positive and is still reported. The PR only replaced it with a version that adds an error path: 'Assuming that condition a==b is not redundant'. The main line is the old version without notes, and the your line is the same warning with a more informative explanation. This is a small improvement in message quality." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sleuthkit/sleuthkit_4.15.0+dfsg.orig.tar.xz", "main sleuthkit-sleuthkit-4.15.0/tools/logicalimager/DriveUtil.cpp:454:5: warning: Either the condition 'pEnumerator' is redundant or there is possible null pointer dereference: pEnumerator. [nullPointerRedundantCheck]\n sleuthkit-sleuthkit-4.15.0/tools/logicalimager/DriveUtil.cpp:430:16: note: Assuming that condition 'pEnumerator' is not redundant\n sleuthkit-sleuthkit-4.15.0/tools/logicalimager/DriveUtil.cpp:420:15: note: Assuming condition is false\n sleuthkit-sleuthkit-4.15.0/tools/logicalimager/DriveUtil.cpp:454:5: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The same nullPointerRedundantCheck warning is still reported at line 454. Only its error path changed: the note \"Assuming condition is false\" at line 420 (`if (FAILED(hres))`) is gone. That note does not explain why pEnumerator could be null. The relevant reasoning is that `while (pEnumerator)` implies pEnumerator may be null, and then line 454 dereferences it. The PR's addErrorPath change deliberately drops conditions that do not mention the tracked value, so the new path is more focused and accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sleuthkit/sleuthkit_4.15.0+dfsg.orig.tar.xz", "main sleuthkit-sleuthkit-4.15.0/tsk/fs/ffs.c:1766:45: style: Condition 'dino_buf' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning is still reported. Only its text changed: the 'your' version now carries notes explaining why (the malloc result was already checked against NULL at line 1763). The condition 'dino_buf' at line 1766 is indeed always true, because the function returns when dino_buf is NULL. The main line had no supporting notes, so the new message is more informative to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sox/sox_14.4.2+git20190427.orig.tar.bz2", "main sox-14.4.2/src/sox_sample_test.h:169:3: style: Comparing expression of type 'signed int' against value 2147483648. Condition is always false. [compareValueOutOfTypeRangeError]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The value 2147483648 (0x80000000) comes from sox's `SOX_INT_MIN(32)` / `SOX_SAMPLE_NEG`, which expands to `1 << 31`. That expression has type int, so in practice it evaluates to INT_MIN (-2147483648), not 2147483648. Cppcheck kept the mathematically widened value on an int-typed token and then reported that an int compared against 2147483648 is 'always false'. That conclusion is wrong: the constant really is INT_MIN, and the comparison can be true, which is exactly what the sox sample tests check. The PR adds a `valueFitsType` check that skips known values not representable in the constant's own type, which removes this bogus message. Removing a false positive is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sox/sox_14.4.2+git20190427.orig.tar.bz2", "main sox-14.4.2/src/sox_sample_test.h:170:3: style: Comparing expression of type 'signed int' against value 2147483648. Condition is always false. [compareValueOutOfTypeRangeError]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "TEST_UINT(24) expands to asserts that compare the signed int `sample` against unsigned constants such as SOX_SAMPLE_MIN, which is 0x80000000 built from unsigned macro arithmetic. In a mixed comparison the signed operand is converted to unsigned, so `sample` with bit pattern 0x80000000 equals 2147483648. The comparison is not always false; these asserts are meant to hold, and they pass in the sox test suite. The old check ignored the usual arithmetic conversions. The PR now evaluates the comparison in its common unsigned type, so this false positive is gone." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sqliteodbc/sqliteodbc_0.99991.orig.tar.gz", "main sqliteodbc-0.99991/blobtoxy.c:1753:12: style: Condition 'start<0' is always false [knownConditionTrueFalse]\n sqliteodbc-0.99991/blobtoxy.c:1745:28: note: Assuming that condition 'insize<=0' is not redundant\n sqliteodbc-0.99991/blobtoxy.c:1751:15: note: Assuming condition is true\n sqliteodbc-0.99991/blobtoxy.c:1752:17: note: Assignment 'start=insize-start', assigned value is greater than 1\n sqliteodbc-0.99991/blobtoxy.c:1753:12: note: Condition 'start<0' is always false" ], "verdict": { "verdict": "neutral", "confidence": "low", "explanation": "The knownConditionTrueFalse warning at line 1753 is reported by both versions. It is a true positive: inside `if (start < 0)` with `insize >= 1`, `insize - start` is at least 2 (ignoring the INT_MIN overflow UB). Only the note at line 1751 changed. It went from 'Assuming condition is true' to 'Assuming that condition 'start<0' is not redundant'. The new wording names the condition, which helps a little. The old wording describes the branch assumption more precisely, because the value comes from being inside the true branch. Neither note is clearly better, and the warning itself is the same, so the change hardly matters to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sqliteodbc/sqliteodbc_0.99991.orig.tar.gz", "your sqliteodbc-0.99991/blobtoxy.c:1753:12: style: Condition 'start<0' is always false [knownConditionTrueFalse]\n sqliteodbc-0.99991/blobtoxy.c:1745:28: note: Assuming that condition 'insize<=0' is not redundant\n sqliteodbc-0.99991/blobtoxy.c:1751:15: note: Assuming that condition 'start<0' is not redundant\n sqliteodbc-0.99991/blobtoxy.c:1752:17: note: Assignment 'start=insize-start', assigned value is greater than 1\n sqliteodbc-0.99991/blobtoxy.c:1753:12: note: Condition 'start<0' is always false" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The warning itself is unchanged and is a true positive. Inside `if (start < 0)` with `insize > 0`, `start = insize - start` is at least 2, so the inner `start < 0` can never be true (ignoring signed overflow). The code probably meant `insize + start`. Only the note at line 1751 changed, from \"Assuming condition is true\" to \"Assuming that condition 'start<0' is not redundant\". Both describe the assumption `start < 0` that the inferred range depends on. Neither wording is clearly more accurate, so the change does not matter to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sunxi-tools/sunxi-tools_1.4.2+git20260530.d7bbd1.orig.tar.gz", "main sunxi-tools-1.4.2+git20260530.d7bbd1/nand-image-builder.c:981:6: style: Condition '!info->page_size' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The code checks '!info->page_size' twice in a row. The first check returns when it is true, so the second check at line 981 is always false. It is a real copy-paste bug (it should check oob_size). The warning is a true positive and is still reported. The PR only changes the message: it now has an error path pointing to the earlier condition at line 976. That note explains why the condition is always false, so the message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/u/uefitool/uefitool_0.28.0+A73.orig.tar.gz", "main LongSoft-UEFITool-2979662/common/Tiano/EfiTianoDecompress.c:836:67: style: Condition '(CompressedSize+8)<8' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "CompressedSize is a UINT32, so 'CompressedSize + 8' is unsigned arithmetic and wraps when CompressedSize > 0xFFFFFFF7. That makes '(CompressedSize + 8) < 8' a deliberate overflow check that can be true. The main warning claiming it is always false was a false positive. The PR stops inferring ranges for unsigned arithmetic that may wrap (isUnsignedArithmeticNoWrap / mayWrap), which removes it." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/v/virglrenderer/virglrenderer_1.3.0.orig.tar.bz2", "main virglrenderer-1.3.0/src/vrend/vrend_shader.c:7516:56: style: Condition 'ctx->num_out_clip_dist' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The warning at line 7516 is still reported. It shows up as a main/your pair only because the PR added notes to it: the new version includes 'Assuming that condition ctx->num_out_clip_dist is not redundant' at 7512. The warning is a true positive, because the inner `ctx->num_out_clip_dist ? ... : 8` sits inside `if (ctx->num_out_clip_dist)`, so the inner test is always true. The added error path explains why, which makes the message more useful." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/x/xcb-imdkit/xcb-imdkit_1.0.9.orig.tar.xz", "your xcb-imdkit-1.0.9/src/xlibi18n/lcCT.c:606:59: style: Condition 'tmp_ctext[0]&0x80' is always true [knownConditionTrueFalse]\n xcb-imdkit-1.0.9/src/xlibi18n/lcCT.c:606:34: note: Assuming that condition 'tmp_ctext[0]&0x80' is not redundant\n xcb-imdkit-1.0.9/src/xlibi18n/lcCT.c:606:59: note: Condition 'tmp_ctext[0]&0x80' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 606 tests `(tmp_ctext[0] & 0x80) && (tmp_ctext[0] & 0x80)`. This is a real copy-paste bug; the second test was almost certainly meant to be `tmp_ctext[1] & 0x80`. The second condition is redundant and always true once the first holds, so the warning is a true positive in both runs. The only difference is that the PR's message now includes notes, 'Assuming that condition ... is not redundant' at the first operand, which point to the duplicated check. Same warning, with a clearer explanation." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/x/xfce4-pulseaudio-plugin/xfce4-pulseaudio-plugin_0.5.1.orig.tar.xz", "main xfce4-pulseaudio-plugin-0.5.1/panel-plugin/pulseaudio-mpris.c:153:18: style: Condition 'error' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "high", "explanation": "The warning at line 153 is still reported, with the same text. It shows up as removed and re-added only because the 'your' output now attaches notes ('Assuming that condition 'error' is not redundant' at line 150). The warning is a true positive: inside 'if (error)', the inner 'error ? ... : ...' is always true. The added notes give context but do not change the message, and nothing that matters to users changed." } } ], "started": "2026-11-19 00:43:58 UTC", "runner": "pc" }