{ "tokens": { "input": 130363, "cache_read": 3156240, "cache_write": 789060, "output": 20328 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/c/catdvi/catdvi_0.14.orig.tar.gz", "your catdvi-0.14/layout.c:453:20: warning: Uninitialized variables: p.b, p.b, p.prev, p.prev, p.next, p.next [uninitvar]\n catdvi-0.14/layout.c:659:9: note: Assuming condition is false\n catdvi-0.14/layout.c:663:5: note: Assuming condition is true\n catdvi-0.14/layout.c:667:9: note: Assuming condition is true\n catdvi-0.14/layout.c:678:31: note: Calling function 'page_word_init', 2nd argument 'curr_alpha' value is \n catdvi-0.14/layout.c:453:13: note: Assignment 'p=alpha', assigned value is \n catdvi-0.14/layout.c:453:20: note: Uninitialized variables: p.b, p.b, p.prev, p.prev, p.next, p.next" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The new uninitvar warning says `curr_alpha` is uninitialized when it is passed to `page_word_init()` at line 678. That caller code is not shown, so this cannot be fully confirmed. The note trail ('Assuming condition is false', then 'true', 'true') points to the usual flag-guarded pattern: `curr_alpha` is assigned when a word starts and only passed on when a word ends. Cppcheck does not tie the two conditions together. The PR changes valueflow (condition handling, subfunction pass order, path merging) and does not add any real uninitialized-variable detection. So this new interprocedural warning is most likely a side effect that invents an impossible path. The message itself also looks garbled: duplicated members `p.b, p.b, p.prev...`, and line 453 is the `trailing_spaces` assignment, not `p=alpha`. That makes it a likely false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/cdpr/cdpr_2.4.orig.tar.gz", "main cdpr-2.4/cdprs.c:91:6: style: Condition 'url' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "low", "explanation": "The same knownConditionTrueFalse warning at line 91 is reported by both versions; only its error-path notes differ. The warning is a true positive: `urlencode` calls `exit(1)` when `malloc` fails, so it never returns NULL and `if (url)` is always true. The new notes (the `str==NULL` check, then `urlencode` returning non-zero) explain this correctly. Main's notes are not shown, so we cannot tell whether the new path is more accurate. For users the warning itself does not change." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/csh/csh_20240808.orig.tar.xz", "your csh-20240808/misc.c:217:8: style: Condition 'j!=i' is always true [knownConditionTrueFalse]\n csh-20240808/misc.c:213:11: note: Assuming that condition 'i==j' is not redundant\n csh-20240808/misc.c:215:11: note: Assuming condition is true\n csh-20240808/misc.c:217:8: note: Condition 'j!=i' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Both versions report the same true positive. Line 213 returns early when `i == j`, so `j != i` at line 217 is always true. Main reported it without an error path. The PR adds notes pointing to the `i==j` check at line 213, which is the actual reason the condition is always true, plus the enclosing `j >= 0` branch. The message explains itself better and no false information is added." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dbench/dbench_4.0.orig.tar.gz", "main dbench-4.0/child.c:227:9: style: Condition 'i>0' is always true [knownConditionTrueFalse]\n dbench-4.0/child.c:220:9: note: Assuming that condition 'i<2' is not redundant\n dbench-4.0/child.c:222:7: note: Assuming condition is false\n dbench-4.0/child.c:227:9: note: Condition 'i>0' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning is still reported and is correct. Line 220 continues when i<2, so i>=2 at line 227 and 'i>0' is always true. The only change is that the error path dropped the note 'Assuming condition is false' at line 222. That note refers to the unrelated strncmp check, which does not affect i. The PR adds a filter in addErrorPath that skips conditions that do not reference the tracked value. The shorter error path points only to the relevant condition, so the message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/drkonqi/drkonqi_6.7.4.orig.tar.xz", "main drkonqi-6.7.4/src/backtracegenerator.cpp:166:21: style: Condition 'm_proc' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "low", "explanation": "Both versions report the same `knownConditionTrueFalse` warning for `if (m_proc)` at line 166; only the attached error path differs. The new path includes 'Assuming condition is false' for the unrelated `!m_proc->waitForFinished(500)` at line 163, and main's notes are not shown, so it cannot be told whether the explanation got better or worse. The warning itself is probably a false positive in both versions: `waitForFinished()` can synchronously emit `finished`, which runs `slotProcessExited()` and sets `m_proc` to null. The PR neither fixes nor introduces it, so the verdict is neutral." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/f/fsa/fsa_1.15.9+dfsg.orig.tar.xz", "your fsa-1.15.9/MW/src/RMComm/MW-Socket/MWSocketRC.C:1167:36: style: Condition 'socketWorkers[remote].socket<0' is always false [knownConditionTrueFalse]\n fsa-1.15.9/MW/src/RMComm/MW-Socket/MWSocketRC.C:1116:12: note: Assuming that condition 'temp<0' is not redundant\n fsa-1.15.9/MW/src/RMComm/MW-Socket/MWSocketRC.C:1126:47: note: Assuming condition is false\n fsa-1.15.9/MW/src/RMComm/MW-Socket/MWSocketRC.C:1166:33: note: Assignment 'socketWorkers[remote].socket=temp', assigned value is greater than -1\n fsa-1.15.9/MW/src/RMComm/MW-Socket/MWSocketRC.C:1167:36: note: Condition 'socketWorkers[remote].socket<0' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Both versions report the same warning, and it looks like a true positive. Line 1116 returns when 'temp < 0', so 'temp' is non-negative when it is assigned at line 1166, and the check at line 1167 can never be true. Only the error path changed. The note at 1146 ('Assuming condition is false' for 'socketWorkers[remote].socket != -1') is gone. That condition says nothing about 'temp', so the note was misleading. The note at 1126 stays, which fits because that condition likely uses 'temp' (the recv on the new socket). The PR adds a filter in addErrorPath that drops assumptions about conditions the tracked value does not depend on. The trace is now shorter and more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gcl/gcl_2.6.14.orig.tar.gz", "main gcl-2.6.14/o/malloc.c:510:26: style: Comparing expression of type 'char' against value 247. Condition is always true. [compareValueOutOfTypeRangeError]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 510 does not match column 26; the flagged comparison is most likely `p->mh_alloc != ISALLOC` on line 512, where ISALLOC sits at column 26. In GNU malloc, ISALLOC is defined as `((char) 0xf7)` (247) and ISMEMALIGN as `((char) 0xd6)` (214). The macros are not shown in this excerpt, so that definition is an assumption. With that cast, the char field `mh_alloc` is compared against a value that is itself a char. The comparison is meaningful and depends on what was stored. Main seemingly ignored the char cast and treated the constant as 247, then reported it as out of range. The PR removes this false positive, consistent with removing the matching ISMEMALIGN (214) warning." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gfarm/gfarm_2.8.11+dfsg.orig.tar.xz", "your gfarm-2.8.11/linux/kernel/gfsk_ccib.c:1462:24: warning: Either the condition 'rpc' is redundant or there is possible null pointer dereference: rpc. [nullPointerRedundantCheck]\n gfarm-2.8.11/linux/kernel/gfsk_ccib.c:1963:2: note: Assuming that condition 'rpc' is not redundant\n gfarm-2.8.11/linux/kernel/gfsk_ccib.c:1978:28: note: Calling function 'gfcc_post_send', 1st argument 'rpc' value is 0\n gfarm-2.8.11/linux/kernel/gfsk_ccib.c:1462:24: note: Null pointer dereference" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself is the same; only its notes changed. The redundant note 'Assuming condition is true' at 1963:2 is gone, right after 'Assuming that condition 'rpc' is not redundant' at the same location. The remaining path (rpc checked at line 1963, then passed to gfcc_post_send at 1978 and dereferenced at 1462) is unchanged. The PR changed how condition notes are added to error paths (the addErrorPath filter). Dropping a duplicate note slightly cleans up the message without losing information." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/globus-xio/globus-xio_6.7.orig.tar.gz", "your globus_xio-6.7/test/read_barrier_test.c:106:21: style: Condition 'globus_l_eof_hit' is always true [knownConditionTrueFalse]\n globus_xio-6.7/test/read_barrier_test.c:102:16: note: Assuming that condition '!globus_l_eof_hit' is not redundant\n globus_xio-6.7/test/read_barrier_test.c:106:21: note: Condition 'globus_l_eof_hit' is always true" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both main and the PR report the same warning on line 106: 'globus_l_eof_hit' is always true. The warning is a true positive. Line 106 is the else branch of 'if(!globus_l_eof_hit)', and nothing between the two checks changes the global, so the first operand of '&&' is redundant. Only the notes attached to the warning differ. The new note points at the relevant condition on line 102, which is accurate, but main's notes are not shown, so there is no clear gain or loss for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/groff/groff_1.25.0.orig.tar.gz", "your groff-1.25.0/src/roff/troff/env.cpp:404:9: style: Condition 'gc_np' is always true [knownConditionTrueFalse]\n groff-1.25.0/src/roff/troff/env.cpp:403:27: note: Assuming that condition 'gc_np' is not redundant\n groff-1.25.0/src/roff/troff/env.cpp:404:9: note: Condition 'gc_np' is always true" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "Line 403 tests `(!suppress_push) && gc_np`, so inside that block the inner check `gc_np` at line 404 is always true. The warning is a true positive in both runs. Only the error path changed: main added an extra 'Assuming condition is true' note, and the PR drops it. The PR path cites the outer gc_np test at 403, which is the condition that actually makes 404 redundant. That is a small gain in accuracy of the explanation." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/grpc-java/grpc-java_1.41.3+ds.orig.tar.xz", "your grpc-java-1.41.3/compiler/src/java_plugin/cpp/java_generator.cpp:728:16: style: Condition '!interface' is always true [knownConditionTrueFalse]\n grpc-java-1.41.3/compiler/src/java_plugin/cpp/java_generator.cpp:701:9: note: Assuming that condition 'interface' is not redundant\n grpc-java-1.41.3/compiler/src/java_plugin/cpp/java_generator.cpp:728:16: note: Condition '!interface' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself is unchanged and is a true positive. If 'interface' is true, line 701 does 'continue', so '!interface' at line 728 is always true. The only difference is that the PR drops the note 'Assuming condition is false' at line 708. That note pointed at 'if (impl_base)', which has nothing to do with the value of 'interface'. The PR's addErrorPath change now skips conditions that do not reference the tracked value, so the error path is shorter and more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/g/gtk+3.0/gtk+3.0_3.24.52.orig.tar.xz", "your gtk-3.24.52/testsuite/gtk/filtermodel.c:404:15: style: Condition 'root_path' is always true [knownConditionTrueFalse]\n gtk-3.24.52/testsuite/gtk/filtermodel.c:403:11: note: Assuming that condition '!root_path' is not redundant\n gtk-3.24.52/testsuite/gtk/filtermodel.c:404:15: note: Condition 'root_path' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "In `!root_path || (root_path && ...)`, the inner `root_path` is only evaluated when `!root_path` is false, so it is always true. The warning is a true positive both before and after the PR. The only difference is that the new output adds error-path notes ('Assuming that condition !root_path is not redundant'). These notes explain why the condition is always true, so the message is more informative." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/h/health-check/health-check_0.04.01.orig.tar.xz", "main health-check-0.04.01/fnotify.c:599:24: style: Condition 'fnotify_wakelocks.head' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "At line 599 the code is in the else branch of `if (!fnotify_wakelocks.head)`, so `fnotify_wakelocks.head` really is always true there. The warning is a true positive in both versions. Main's message only had the main line. The PR's message adds notes pointing to the earlier condition at line 596 that makes it always true. The diff shows the same warning text with a changed error path, so the message became more informative for the user." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/j/jed/jed_0.99.20~pre.204+dfsg.orig.tar.xz", "main jed-pre0.99.20-204/src/gtkterm.c:4928:18: style: Condition 'bufp==NULL' is always true [knownConditionTrueFalse]\n jed-pre0.99.20-204/src/gtkterm.c:4912:19: note: Assuming that condition 'bufp!=NULL' is not redundant\n jed-pre0.99.20-204/src/gtkterm.c:4926:28: note: Assuming condition is true\n jed-pre0.99.20-204/src/gtkterm.c:4928:18: note: Condition 'bufp==NULL' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself is a true positive. In the else branch of 'if (bufp != NULL)', bufp is NULL, so 'bufp == NULL' at line 4928 is always true. Only the error path changed. The removed note 'Assuming condition is true' at 4926 pointed at '*n_chars == 1', a condition unrelated to bufp. The PR's addErrorPath filter drops assumptions on conditions that do not reference the tracked value. The new path keeps only the relevant note at 4912 ('bufp!=NULL'), so the message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/j/jed/jed_0.99.20~pre.204+dfsg.orig.tar.xz", "your jed-pre0.99.20-204/src/gtkterm.c:780:24: style: Condition 'thisEventBuffer->jXGtkNumEv' is always true [knownConditionTrueFalse]\n jed-pre0.99.20-204/src/gtkterm.c:772:12: note: Assuming that condition '!thisEventBuffer->jXGtkNumEv' is not redundant\n jed-pre0.99.20-204/src/gtkterm.c:780:24: note: Condition 'thisEventBuffer->jXGtkNumEv' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The `while (!(thisEventBuffer->jXGtkNumEv))` loop exits only when `jXGtkNumEv` is nonzero. Nothing changes it before the `if` at line 780, so 'always true' is a true positive in both versions. Main reported it with no error-path notes. The PR adds a note pointing to the loop condition at line 772, which is where the fact comes from, so the diagnostic is now easier to understand." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/k/kcm-fcitx5/kcm-fcitx5_5.0.3.orig.tar.gz", "your kcm-fcitx5-5.0.3/layout/keyboardlayoutwidget.cpp:225:11: style: Condition 'vd.layout' is always true [knownConditionTrueFalse]\n kcm-fcitx5-5.0.3/layout/keyboardlayoutwidget.cpp:221:22: note: Assuming that condition '!vd.layout' is not redundant\n kcm-fcitx5-5.0.3/layout/keyboardlayoutwidget.cpp:225:11: note: Condition 'vd.layout' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 221 returns when `!vd.layout` is true, so `vd.layout` is always non-null at line 225. The warning is a true positive in both versions. The PR's version carries an error-path note that points at the condition that actually proves it ('!vd.layout' at 221). This fits the PR change that stops recording unrelated conditions in a value's error path. The main output shown here has no note text, so I cannot confirm what it pointed to, but the new note is accurate and relevant, making the diagnostic more precise." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/k/keditbookmarks/keditbookmarks_26.08.2.orig.tar.xz", "main keditbookmarks-26.08.2/src/kebsearchline.cpp:392:21: style: Condition 'match' is always false [knownConditionTrueFalse]\n keditbookmarks-26.08.2/src/kebsearchline.cpp:377:9: note: Assuming that condition 'match' is not redundant\n keditbookmarks-26.08.2/src/kebsearchline.cpp:385:31: note: Assuming condition is false\n keditbookmarks-26.08.2/src/kebsearchline.cpp:391:27: note: Assuming condition is true\n keditbookmarks-26.08.2/src/kebsearchline.cpp:392:21: note: Condition 'match' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 390 assigns `match = false`, so `match` in `match || anyVisible(...)` at line 392 is always false. The warning is a true positive and both versions report it. The only change is the error path. Main added notes about unrelated conditions: `isVisible(parent) == false` at line 385 and `topLeft.row() >= 1` at line 391. Neither condition mentions `match`, and neither explains why it is false. The PR's new filter in `addErrorPath` drops these irrelevant assumption notes, which makes the diagnostic more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/k/kvazaar/kvazaar_2.3.2.orig.tar.gz", "your kvazaar-2.3.2/src/search_intra.c:269:29: style: Condition 'depth<=3' is always true [knownConditionTrueFalse]\n kvazaar-2.3.2/src/search_intra.c:250:34: note: Assuming that condition 'depth<4' is not redundant\n kvazaar-2.3.2/src/search_intra.c:269:29: note: Condition 'depth<=3' is always true" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The warning is still a true positive. Line 269 sits inside `if (depth < max_depth && depth < MAX_PU_DEPTH)`, and MAX_PU_DEPTH is 4, so `depth <= 3` is always true there. Only the error path changed. The old path included the note 'Assuming condition is true' at line 254 (`split_cost < nosplit_cost`), a condition that has nothing to do with `depth`. The PR's addErrorPath filter now drops notes for conditions that do not reference the tracked value. The remaining path points only at the relevant condition on line 250, so the message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/k/kwave/kwave_26.04.0.orig.tar.xz", "your kwave-26.04.0/plugins/codec_wav/RIFFParser.cpp:653:21: style: Condition 'm_cancel' is always false [knownConditionTrueFalse]\n kwave-26.04.0/plugins/codec_wav/RIFFParser.cpp:645:31: note: Assuming that condition 'm_cancel' is not redundant\n kwave-26.04.0/plugins/codec_wav/RIFFParser.cpp:653:21: note: Condition 'm_cancel' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Both versions report the same warning; only the error path changed. The PR drops the notes 'Assuming condition is false' at line 648 (`chunk->type() == Garbage`) and 'Assuming container is not empty' at line 652 (`subchunks`). Neither has anything to do with `m_cancel`. The remaining path goes from the `m_cancel` check at line 645 to the repeated check at line 653, which is the actual reasoning behind the warning. The message is unchanged and now carries only the relevant notes, so it is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/k/kylin-burner/kylin-burner_3.0.11.orig.tar.gz", "main kylin-burner-3.0.11/libburner-burn/burn-mkisofs-base.c:261:6: style: Condition 'discpath' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "high", "explanation": "The warning is still reported, with the same text. The main line and the your line are identical; the diff only differs in the supporting notes ('Assuming that condition 'discpath==NULL' is not redundant'). The warning itself is a true positive: line 252 returns early when discpath is NULL, so 'if (discpath)' at line 261 is always true. Nothing changes for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/l/linphone-desktop/linphone-desktop_5.2.6+dfsg.orig.tar.xz", "main linphone-desktop-5.2.6/linphone-app/src/components/calls/CallsListModel.cpp:690:6: style: Condition 'callModel' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 689 assigns the address of a reference returned by getData, so 'callModel' really is never null and checking it at line 690 is redundant. Both main and the PR report the same warning on this line. Only the attached notes differ: the PR's version adds the note 'Assignment callModel=&call->getData(\"call-model\"), assigned value is never 0' and the note 'Condition callModel is always true'. This main line is simply the old copy of that warning, and the new copy explains why the condition is always true. The message became more informative without changing whether it is correct." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/l/lunzip/lunzip_1.16.orig.tar.xz", "your lunzip-1.16/lzip_index.c:241:20: style: Comparing expression of type 'signed long long' against value 9223372036854775807. Condition is always false. [compareValueOutOfTypeRangeError]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`li->insize` is a `long long`, as the message says ('signed long long'). It is compared with `INT64_MAX` (9223372036854775807), which is the largest value a 64-bit signed long long can hold. So `li->insize > INT64_MAX` can never be true, and the warning is a true positive. The old check skipped types of 63 bits or more, so it missed this case; the PR now handles 64-bit types. The check is intentionally defensive and possibly portability-minded, but it is dead code, which is what this warning is meant to flag." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libg/libgnomekbd/libgnomekbd_3.28.1.orig.tar.xz", "main libgnomekbd-3.28.1/libgnomekbd/gkbd-keyboard-drawing.c:2535:17: style: Condition 'variant==NULL' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "high", "explanation": "The same warning appears on both sides. Main reports it without notes, and the PR reports it at the same location with the same text plus notes ('Assuming that condition variant!=NULL is not redundant'). The diff tool pairs them as a removed/added couple, but the finding itself is unchanged. The warning is a true positive either way: variant != NULL is checked in the enclosing if condition, so 'variant==NULL' inside that branch is always false. Only the error-path notes differ, which does not matter much to users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libk/libkrun/libkrun_1.19.4.orig.tar.gz", "main libkrun-1.19.4/init/tee/kbs/kbs_util.c:160:22: style: Condition 'label[i]!='\\0'' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The warning is still reported at the same location with the same text. Only the attached error-path notes differ between main and the PR. The warning is a true positive: `label_sz = strlen(label)`, so for every `i < label_sz`, `label[i]` cannot be `'\\0'`, and the check at line 160 is always true. Main's notes are not shown, so it cannot be said whether the PR's notes are better or worse. The user-visible diagnostic is effectively unchanged." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libt/libt3highlight/libt3highlight_0.5.0.orig.tar.bz2", "main libt3highlight-0.5.0/src/match.c:53:17: style: Condition 'extra!=NULL' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "The code is `extra == NULL || (extra != NULL && ...)`. Because of short-circuit evaluation, `extra != NULL` is always true when it is reached, so the warning is a true positive in both versions. The only change is that the new output adds note lines that explain the reasoning: it assumes `extra==NULL` is not redundant, so `extra!=NULL` is always true. The warning is the same, but the message is better explained. This is a small improvement in message quality, not a lost or added finding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/libu/libuemf/libuemf_0.2.8+ds.orig.tar.xz", "your libUEMF-0.2.8/testbed_pmf.c:113:13: style: Condition 'noa' is always true [knownConditionTrueFalse]\n libUEMF-0.2.8/testbed_pmf.c:111:12: note: Assuming that condition 'noa==1' is not redundant\n libUEMF-0.2.8/testbed_pmf.c:113:13: note: Condition 'noa' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Inside `if(noa==1)`, `noa` is 1, so `noa` at line 113 is always true. The warning is a true positive in both versions; only the note list changed. Main included the note 'Assuming condition is true' for line 112 (`*s1 != *s2`). That condition says nothing about `noa`, so the note pointed at an unrelated condition. The PR's addErrorPath filter drops notes for conditions that do not involve the tracked value. The remaining notes explain the warning correctly, so the message is more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/memtest86/memtest86_4.3.7.orig.tar.gz", "main src/init.c:901:49: style: Condition 'v->clks_msec==-1' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "`v->clks_msec` is an unsigned `ulong`, and the code sets it to -1 in the calibration failure path (line 881). In `v->clks_msec == -1`, the -1 is converted to ULONG_MAX, so the comparison is true exactly when that failure value was stored. Calling the condition 'always false' was a false positive, probably from treating an unsigned value as never equal to -1. The PR makes comparisons convert the constant to the operand's type, which removes this wrong warning." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/mesa-demos/mesa-demos_9.0.0.orig.tar.gz", "main mesa-demos-9.0.0/src/samples/loadppm.c:58:9: style: Condition '!result' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "high", "explanation": "This is the same true-positive warning, now with error-path notes. Line 58 re-checks '!result' after the earlier 'if (!result) exit(1);' at line 34, so the condition is always false. The code most likely meant '!result->data'. The main line went away only because its text changed: the new one adds the notes, which are correct and make the message clearer." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/mesa-demos/mesa-demos_9.0.0.orig.tar.gz", "your mesa-demos-9.0.0/src/samples/loadppm.c:58:9: style: Condition '!result' is always false [knownConditionTrueFalse]\n mesa-demos-9.0.0/src/samples/loadppm.c:34:9: note: Assuming that condition '!result' is not redundant\n mesa-demos-9.0.0/src/samples/loadppm.c:58:9: note: Condition '!result' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 34 already exits when `result` is NULL, so `!result` at line 58 really is always false. This is a true positive and a real copy-paste bug: the code should check `result->data`. The warning itself is unchanged. The PR only changes the attached notes, which now point to the earlier check at line 34 that establishes the fact. That helps the user see why the condition is always false, so the message is more informative." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/n/ndctl/ndctl_85.orig.tar.gz", "your pmem-ndctl-b30f916/cxl/bus.c:136:12: style: Condition 'rc' is always true [knownConditionTrueFalse]\n pmem-ndctl-b30f916/cxl/bus.c:134:10: note: Assuming that condition 'rc==0' is not redundant\n pmem-ndctl-b30f916/cxl/bus.c:136:12: note: Condition 'rc' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "In the else branch of `if (rc == 0)`, `rc` must be non-zero, so `rc && !err` has a redundant `rc`. The knownConditionTrueFalse warning is a true positive in both versions. Only the error path changed: main reported it without notes, and the PR adds the note pointing at the `rc==0` check on line 134. That note is correct and explains why the condition is always true, so the message is more helpful." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/n/netplan.io/netplan.io_1.2.2.orig.tar.gz", "main netplan-1.2.2/src/validation.c:159:20: style: Condition 'host' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "high", "explanation": "The same knownConditionTrueFalse warning at line 159 appears in both main and your. In the else-if branch `!host` is false, so `host` is non-null and the `host &&` check is redundant. The warning is a true positive. The removed main line and the added your line describe the same finding; the only difference is the attached notes or error path. Users see no material change." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/o/openntpd/openntpd_7.9p1.orig.tar.gz", "your openntpd-7.9p1/src/ntpd.c:351:10: warning: Either the condition '(newp=reallocarray(pfd,new_cnt,sizeof(*pfd)))==NULL' is redundant or there is possible null pointer dereference: pfd. [nullPointerRedundantCheck]\n openntpd-7.9p1/src/ntpd.c:341:23: note: Assuming that condition '(newp=reallocarray(pfd,new_cnt,sizeof(*pfd)))==NULL' is not redundant\n openntpd-7.9p1/src/ntpd.c:347:10: note: Assignment 'pfd=newp', assigned value is 0\n openntpd-7.9p1/src/ntpd.c:351:10: note: Null pointer dereference" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both versions report the same nullPointerRedundantCheck at line 351. It is a likely false positive: the NULL branch calls fatalx(\"exiting\"), which does not return, so 'pfd = newp' never assigns NULL. The PR only drops the note 'Assuming condition is true' for the outer 'if (new_cnt > pfd_elms)' at line 339. That note was minor context, so the error path is barely less complete. The warning, its location and its verdict are unchanged, and users see essentially the same diagnostic." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/prelude-manager/prelude-manager_5.2.0.orig.tar.gz", "main prelude-manager-5.2.0/src/manager-options.c:350:24: style: Condition 'eptr!=arg' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 336 returns when `eptr == arg`, so `eptr != arg` at line 350 really is always true. The warning is a true positive in both versions. The only difference is that the PR now attaches an error path. Its note points to the right cause, the `eptr==arg` check at line 336, which makes the diagnostic easier to understand. This is a slightly more informative message for the same true positive, not a new or lost finding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/python-bx/python-bx_0.15.0.orig.tar.gz", "your bx-python-0.15.0/src/bunzip/micro-bunzip.c:119:60: error: Signed integer overflow for expression '(1<=24` dump branch has run, and that branch reduces `bits_wanted` by `inbufBitCount`. So `bits_wanted` is never 32 at line 119, and the 'Assuming condition is false' step is impossible. This is a false positive introduced by the PR." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/python-gmpy2/python-gmpy2_2.2.1.orig.tar.gz", "your gmpy2-2.2.1/src/gmpy2_convert_gmp.c:558:21: style: Condition 'wheredot' is always true [knownConditionTrueFalse]\n gmpy2-2.2.1/src/gmpy2_convert_gmp.c:546:13: note: Assuming that condition 'wheredot' is not redundant\n gmpy2-2.2.1/src/gmpy2_convert_gmp.c:558:21: note: Condition 'wheredot' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The code checks `if (wheredot)` at line 558, inside the block of `if (wheredot)` at line 546. `wheredot` is a pointer and is not changed in between; `*wheredot = ' '` writes to the pointee, not the pointer. So the warning is a true positive both before and after the PR. The only change is that the new output adds an error path: a note that points to the outer condition at line 546. That makes the message easier to understand and act on." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/python-llfuse/python-llfuse_1.5.0+dfsg.orig.tar.xz", "your llfuse-1.5.0/src/lock.c:88:19: style: Condition 'lock_taken' is always true [knownConditionTrueFalse]\n llfuse-1.5.0/src/lock.c:76:8: note: Assuming that condition 'lock_taken' is not redundant\n llfuse-1.5.0/src/lock.c:88:19: note: Condition 'lock_taken' is always true" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "Both main and the PR report the same `knownConditionTrueFalse` warning on `while(lock_taken)` at line 88. The only difference is that the PR adds an error-path note pointing at the enclosing `if(lock_taken)` on line 76. The warning is a false positive either way. `lock_taken` is a global that another thread clears in `release()` while this thread is blocked in `pthread_cond_wait()`, so the loop condition is not always true. The added note correctly names the condition Cppcheck reasons from, but it neither fixes nor worsens the false positive. The net effect for users is negligible." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/q/qpwgraph/qpwgraph_1.0.4.orig.tar.gz", "main qpwgraph-1.0.4/src/qpwgraph_canvas.cpp:1610:9: style: Condition 'port' is always true [knownConditionTrueFalse]" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "At line 1610 the code reads `if (port && ...)` inside an enclosing `if (port)` at line 1607, and `port` is not modified in between. So the warning that `port` is always true is a true positive in both versions. The main and your lines have identical text. The diff entry most likely comes only from a change in the attached notes or other output formatting (the 'your' line shows the notes 'Assuming that condition port is not redundant'). It makes no practical difference for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/q/qpwgraph/qpwgraph_1.0.4.orig.tar.gz", "your qpwgraph-1.0.4/src/qpwgraph_pipewire.cpp:236:8: style: Condition 'node' is always true [knownConditionTrueFalse]\n qpwgraph-1.0.4/src/qpwgraph_pipewire.cpp:229:6: note: Assuming that condition 'object' is not redundant\n qpwgraph-1.0.4/src/qpwgraph_pipewire.cpp:235:46: note: Assignment 'node=static_cast(object)', assigned value is never 0\n qpwgraph-1.0.4/src/qpwgraph_pipewire.cpp:236:8: note: Condition 'node' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning is a true positive. `object` is checked non-null at line 229, and a `static_cast` of a non-null pointer is never null, so `if (node)` at line 236 is always true. The warning text is the same in main and in the PR, so only the attached note path changed. The PR's `addErrorPath` change drops assumption notes about conditions the tracked value does not depend on. Here that would remove a note about the unrelated `info && (info->change_mask & ...)` condition at line 233. The remaining notes (the `object` check, the cast assignment, the condition) are exactly the relevant reasoning, so the message got more accurate." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/q/qsopt-ex/qsopt-ex_2.5.10.3.orig.tar.gz", "your qsopt-ex-2.5.10.3/qsopt_ex/ratio.c:1072:16: style: Condition 'tctr!=0' is always true [knownConditionTrueFalse]\n qsopt-ex-2.5.10.3/qsopt_ex/ratio.c:1057:12: note: Assuming that condition 'tctr==0' is not redundant\n qsopt-ex-2.5.10.3/qsopt_ex/ratio.c:1072:16: note: Condition 'tctr!=0' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "In the else-if at line 1072, the first condition `(tctr == 0) || ...` has already failed, so tctr != 0 must hold. The warning is a true positive in both versions. The only change is that the PR adds an error-path note: 'Assuming that condition tctr==0 is not redundant' at 1057. That note correctly points to the condition that makes 'tctr!=0' redundant, so the message now explains itself better. This is a slight improvement in message accuracy." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/q/quickplot/quickplot_1.0.1~rc.orig.tar.bz2", "main quickplot-1.0.1~rc/spew.c:124:42: style: Condition 'strncasecmp(env,\"debug\",1)==0' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 116 already tests `strncasecmp(env,\"debug\",1)==0` in an earlier else-if branch. So by line 124 that same call cannot be 0, and the warning is a true positive in both versions. The PR keeps the warning but now attaches an error path. The notes point to the earlier identical condition at line 116 as the reason it is always false. That makes the diagnostic easier to understand without changing its correctness. Confidence is medium because the main output's notes, if it had any, are not shown." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/q/quickplot/quickplot_1.0.1~rc.orig.tar.bz2", "your quickplot-1.0.1~rc/spew.c:79:16: style: Condition 'env[0]=='\\0'' is always false [knownConditionTrueFalse]\n quickplot-1.0.1~rc/spew.c:76:16: note: Assuming that condition 'env[0]' is not redundant\n quickplot-1.0.1~rc/spew.c:79:16: note: Condition 'env[0]=='\\0'' is always false" ], "verdict": { "verdict": "improvement", "confidence": "low", "explanation": "Line 79 sits inside `if(env && env[0])`, so `env[0] == '\\0'` can never be true there. The knownConditionTrueFalse warning is a true positive in both versions. Only the error-path notes changed. The new notes point to the right cause: the assumption on `env[0]` at line 76, then the always-false check at line 79. The PR filters out error-path notes from unrelated conditions, so main's notes were probably less relevant. Main's notes are not shown, so this cannot be confirmed." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/r/r-cran-calculus/r-cran-calculus_1.1.0+dfsg.orig.tar.xz", "your calculus/src/calculus.cpp:329:14: style: Condition 'zero_x' is always false [knownConditionTrueFalse]\n calculus/src/calculus.cpp:322:12: note: Assuming that condition 'zero_x' is not redundant\n calculus/src/calculus.cpp:329:14: note: Condition 'zero_x' is always false" ], "verdict": { "verdict": "neutral", "confidence": "medium", "explanation": "The warning is a true positive both before and after the PR. Line 329 is inside `else if(zero_y)`, which is only reached when `if(zero_x)` was false, so `zero_x` is always false there. The only change is that the PR dropped the intermediate note 'Assuming condition is true' at line 328 (`zero_y`). That note was not needed to explain the result, because `zero_x` is false no matter what `zero_y` is. This matches the PR's addErrorPath change, which skips conditions that do not mention the tracked value. The message itself is unchanged and the error path is still correct, so this hardly matters to users. If anything it is slightly cleaner." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/r/r-cran-lwgeom/r-cran-lwgeom_0.2-17.orig.tar.gz", "main lwgeom/src/liblwgeom/lwgeom_topo.c:4589:16: style: Condition 'result==-1' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning itself is unchanged and still correct. If 'result == -1' were true at line 4581, the code returns. So at line 4589 'result' cannot be -1, because the code assigns 'i' instead of 'result', which is a real copy-paste bug in the source. The PR only adds error-path notes that point to the condition at 4581, which explains why the condition is always false. The removed 'main' line is replaced by the same warning with better notes, so the message became more informative." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/r/rmatrix/rmatrix_1.7-6.orig.tar.gz", "main Matrix/src/SuiteSparse/CHOLMOD/SuiteSparse_metis/GKlib/csr.c:1784:21: style: Condition 'i2==nind2' is always false [knownConditionTrueFalse]\n Matrix/src/SuiteSparse/CHOLMOD/SuiteSparse_metis/GKlib/csr.c:1779:28: note: Assuming that condition 'i2text_value==NULL' is always false [knownConditionTrueFalse]\n ibm-s390-linux-s390-tools-a812ace/libkmipclient/kmip.c:898:24: note: Assuming that condition 'node->text_value!=NULL' is not redundant\n ibm-s390-linux-s390-tools-a812ace/libkmipclient/kmip.c:900:25: note: Condition 'node->text_value==NULL' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The warning is a true positive both before and after the PR. Inside 'if (node->text_value != NULL)' the code checks 'node->text_value == NULL', which is always false. This is a real bug: it should check 'clone->text_value' after the strdup. The PR only changes the message: main printed it with no notes, and the new output adds notes giving the error path (the earlier 'node->text_value!=NULL' condition). The reported condition and text are the same, and the new notes are accurate and help the user." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/sip5/sip5_5.5.0+dfsg.orig.tar.xz", "your sip-5.5.0/code_generator/gencode.c:7601:16: style: Condition 'nrvals==0' is always false [knownConditionTrueFalse]\n sip-5.5.0/code_generator/gencode.c:7587:16: note: Assuming that condition 'nrvals==0' is not redundant\n sip-5.5.0/code_generator/gencode.c:7601:16: note: Condition 'nrvals==0' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Both versions report the same true positive: the `if (nrvals == 0)` at line 7587 returns early, so `nrvals == 0` at line 7601 is always false. The PR's version adds a note pointing to line 7587, which is the condition that actually makes 7601 redundant. The main version shows no such note. The warning stays correct and its explanation is now more precise, so this is a small improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/swish-e/swish-e_2.4.7.orig.tar.gz", "your swish-e-2.4.7/src/search.c:2817:9: style: Condition 'l_r1' is always true [knownConditionTrueFalse]\n swish-e-2.4.7/src/search.c:2815:9: note: Assuming that condition '!l_r1' is not redundant\n swish-e-2.4.7/src/search.c:2817:9: note: Condition 'l_r1' is always true" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The function returns early when `!l_r1`, so `l_r1` is always non-null at line 2817 and the warning is a true positive. Main reported the same warning with the same text but without the note lines. The PR version adds an error path: \"Assuming that condition '!l_r1' is not redundant\" at line 2815. That note is correct and explains why the condition is always true, so the message is more informative." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/t/tinyobjloader/tinyobjloader_2.0.0~rc13+dfsg.orig.tar.xz", "your tinyobjloader-2.0.0rc13/examples/voxelize/voxelizer.h:740:17: style: Condition '!node' is always false [knownConditionTrueFalse]\n tinyobjloader-2.0.0rc13/examples/voxelize/voxelizer.h:737:32: note: Assuming that condition 'table->elements[i]!=NULL' is not redundant\n tinyobjloader-2.0.0rc13/examples/voxelize/voxelizer.h:738:40: note: node is assigned 'table->elements[i]' here.\n tinyobjloader-2.0.0rc13/examples/voxelize/voxelizer.h:740:17: note: Condition '!node' is always false" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Both versions report the same true positive: line 737 already checks `table->elements[i] != NULL`, `node` is assigned that value on line 738, so `!node` on line 740 is always false. The only difference is that the new output includes the error-path notes (assuming the condition at 737, the assignment at 738). These explain the reasoning, so the message is more informative for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/x/xfsprogs/xfsprogs_7.2.0.orig.tar.xz", "your xfsprogs-7.2.0/db/timelimit.c:35:38: style: Comparing expression of type 'signed long' against value 9223372036854775807. Condition is always true. [compareValueOutOfTypeRangeError]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`limit` is an `int64_t`, which is `signed long` on the analyzed LP64 platform. `limit <= LONG_MAX` compares it against its own type's maximum, so the condition is always true there. The old code skipped every type of 63 or more bits; the PR extends this platform-dependent style check to 64-bit types. The same check already warns on `int x <= INT_MAX`, so this new warning is consistent with how the check is meant to work. The guard is meaningful on 32-bit-long platforms, so some users may see it as noise, but for the checked platform the message is accurate." } } ], "started": "2026-11-28 12:01:14 UTC", "runner": "pc" }