AI review of 2026-11-22_13-12-12-ff675417fd32-results.txt PR: #8819 https://github.com/cppcheck-opensource/cppcheck/pull/8819 Tested: ff675417fd32427e6374823b50e1c290a2086634 Merge base: 64cee516264b28048ba7fbe12d02160731652060 Reviewed: 2026-11-24 01:48:56 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 3531 in the report (random sample), 84 not reviewed: valueFlowMaxIterations Verdicts: 1 acceptable regression, 32 improvement, 16 neutral, 1 regression Tokens: 138211 input, 3789807 cache read, 77343 cache write, 20332 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/asc/asc_2.6.1.0.orig.tar.bz2 Result: main asc-2.6.1.0/source/libs/paragui/src/font/pgfont.cpp:621:16: style: Condition 'FaceCache!=NULL' is always true [knownConditionTrueFalse] Explanation: FaceCache is checked against NULL at line 614, and the function returns early if it is NULL. That makes the check at line 621 redundant and always true. Both main and your report the same warning. The only difference is that the new version adds error-path notes ('Assuming that condition FaceCache==NULL is not redundant'), which explain why the condition is always true. The message became more informative and is still a true positive. ---- 2 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/blockattack/blockattack_2.10.0.orig.tar.xz Result: main blockattack-game-2.10.0/source/code/Libs/imgui/imgui_tables.cpp:942:37: style: Condition 'column->Flags&ImGuiTableColumnFlags_WidthFixed' is always true [knownConditionTrueFalse] Explanation: The warning itself is unchanged. The condition at line 942 repeats the test at line 931 inside the same branch, so it is always true and the warning is a true positive both before and after the PR. The only difference is that the PR version adds an error-path note pointing to line 931 ('Assuming that condition ... is not redundant'). The 'main' line here is just one half of a changed-message pair. Users still get the same warning, now with a slightly more informative path, so the change does not matter in practice. ---- 3 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bogl/bogl_0.1.18.orig.tar.gz Result: main bogl-0.1.18/bogl-term.c:676:16: style: Condition 'kk==-1' is always false [knownConditionTrueFalse] Explanation: `kk` is assigned the return value of `wctomb(buf, wc)`, and `wctomb` returns -1 when the character cannot be encoded. Nothing in the code lets Cppcheck prove that `kk == -1` can never hold; the author's "impossible" comment relies on locale knowledge Cppcheck does not have. Main's 'always false' was most likely the old signed/unsigned comparison mishandling or an over-narrow value range, which this PR reworks. Removing this false positive is an improvement. ---- 4 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/calligraplan/calligraplan_4.0.1+dfsg.orig.tar.xz Result: your calligraplan-4.0.1/src/libs/main/KoMainWindow.cpp:1511:13: style: Condition 'pDoc' is always true [knownConditionTrueFalse] calligraplan-4.0.1/src/libs/main/KoMainWindow.cpp:1495:9: note: Assuming that condition '!pDoc' is not redundant calligraplan-4.0.1/src/libs/main/KoMainWindow.cpp:1511:13: note: Condition 'pDoc' is always true Explanation: The warning is still reported. pDoc is checked at line 1495 with an early return, so 'pDoc' at line 1511 is always true and the warning is a true positive. The only change is that the PR adds error-path notes ('Assuming that condition !pDoc is not redundant' at line 1495) that point to where the fact comes from. That makes the message more informative and accurate. ---- 5 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/c/cdemu-daemon/cdemu-daemon_3.3.0.orig.tar.xz Result: your cdemu-daemon-3.3.0/src/device-recording.c:571:23: style: Condition 'self->priv->open_session' is always true [knownConditionTrueFalse] cdemu-daemon-3.3.0/src/device-recording.c:498:9: note: Assuming that condition '!self->priv->open_session' is not redundant cdemu-daemon-3.3.0/src/device-recording.c:571:23: note: Condition 'self->priv->open_session' is always true Explanation: The `knownConditionTrueFalse` warning at line 571 appears in both versions; only its error path changed. The new note points to line 498, `!self->priv->open_session`, a condition on the same variable. That is presumably where the function ensures a session is open, which is what makes `self->priv->open_session` always true at line 571. The PR changes addErrorPath to drop notes about conditions unrelated to the tracked value, so main's path probably cited an unrelated condition and the new path cites the relevant one. Line 498 is not shown, so this cannot be fully confirmed. ---- 6 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/codec2/codec2_1.2.0.orig.tar.gz Result: main codec2-1.2.0/stm32/unittest/src/tst_ofdm_demod.c:289:21: style: Condition 'config_ldpc_en' is always true [knownConditionTrueFalse] Explanation: The nested `if (config_ldpc_en)` at line 289 sits directly inside an outer `if (config_ldpc_en)` at line 266. The flag is not changed between the two checks, so the inner condition really is always true, and the warning is still a true positive. The only difference is that the new output adds a note pointing to the outer condition at line 266 as the reason. That makes the message more useful to the user. ---- 7 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/contourpy/contourpy_1.3.3.orig.tar.gz Result: your contourpy-1.3.3/src/mpl2005_original.cpp:569:32: style: Condition 'level0' is always true [knownConditionTrueFalse] contourpy-1.3.3/src/mpl2005_original.cpp:558:17: note: Assuming that condition 'level0' is not redundant contourpy-1.3.3/src/mpl2005_original.cpp:569:32: note: Condition 'level0' is always true Explanation: Both versions report the same true positive. Inside the block guarded by `if (level0 && edge == edge0 && left == left0)` at line 558, `level0` is not modified, so `level0` in the condition at line 569 is always true. Only the error path differs. The new output shows a single relevant note, 'Assuming that condition level0 is not redundant' at line 558. That matches the PR change to addErrorPath, which drops assumptions about conditions unrelated to the tracked value. The main output's notes are not shown, but the PR's intent suggests it carried unrelated condition notes. The warning is unchanged and its explanation is now focused on the right condition, so this looks like a more accurate message. ---- 8 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/crossfire/crossfire_1.75.0.orig.tar.gz Result: main crossfire-1.75.0/server/login.c:535:17: style: Condition 'check_pass' is always true [knownConditionTrueFalse] Explanation: The warning itself is unchanged and correct. If `!check_pass` were true at line 519, the block would break, so `check_pass` must be nonzero at line 535. The only change is that the 'your' version adds the error-path note pointing to line 519 ('Assuming that condition '!check_pass' is not redundant'), where main printed no note. That makes the message more informative and accurate. ---- 9 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/d/daemon/daemon_0.8.4.orig.tar.gz Result: your daemon-0.8.4/libslack/list.c:2505:15: style: Condition '!list' is always false [knownConditionTrueFalse] daemon-0.8.4/libslack/list.c:2505:6: note: Assuming that condition '!list' is not redundant daemon-0.8.4/libslack/list.c:2505:15: note: Condition '!list' is always false Explanation: The warning itself is unchanged and is a true positive. In `if (!list || !list)` the second `!list` can only be evaluated when the first one was false, so it is always false (an obvious copy/paste bug). Only the attached notes differ. The new notes point to the first `!list` at column 6 as the assumed condition and then to the redundant second one, which explains the warning correctly. The main version's notes are not shown, so how much this improved is uncertain, but the message is at least as accurate as before. ---- 10 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/d/dircproxy/dircproxy_1.0.5.orig.tar.gz Result: main dircproxy-1.0.5/src/irc_log.c:629:14: style: Condition 'recall==-1' is always false [knownConditionTrueFalse] dircproxy-1.0.5/src/irc_log.c:625:7: note: Assuming that condition '!recall' is not redundant dircproxy-1.0.5/src/irc_log.c:629:14: note: Condition 'recall==-1' is always false Explanation: `recall` is `unsigned long`. In `recall == -1`, the constant -1 is converted to ULONG_MAX, so the comparison is true when the config value is the 'recall everything' sentinel. That makes the condition reachable, and main's 'always false' warning was a false positive: it treated -1 as an impossible value for an unsigned variable. The PR reads constants in the comparison's common unsigned type, which removes this false positive. ---- 11 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/directfb/directfb_1.7.7.orig.tar.gz Result: your DirectFB-1.7.7/systems/fbdev/vt.c:678:26: style: Condition '!dfb_vt->flush' is always false [knownConditionTrueFalse] DirectFB-1.7.7/systems/fbdev/vt.c:666:19: note: Assuming that condition 'dfb_vt->flush' is not redundant DirectFB-1.7.7/systems/fbdev/vt.c:678:26: note: Condition '!dfb_vt->flush' is always false Explanation: Main and the PR report the same warning at the same location; only the error path changed. The PR dropped the note 'Assuming condition is false' at 675:23, which points at the `ret < 0 && errno == EINTR` test. That condition does not involve `dfb_vt->flush`. The value Cppcheck tracks comes only from the `while (dfb_vt->flush)` condition at line 666. The PR deliberately stops adding assumption notes from conditions that do not mention the tracked value, so the new trace is shorter and no longer cites an unrelated condition. Whether the warning itself is useful is unchanged: `flush` is cleared by another thread, which Cppcheck cannot see, but that applies equally to main. The only user-visible change is a cleaner, more accurate explanation. ---- 12 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/distcc/distcc_3.4+really3.4.orig.tar.gz Result: your distcc-3.4/src/filename.c:183:16: style: Condition '!strcmp(e,"c")' is always false [knownConditionTrueFalse] distcc-3.4/src/filename.c:181:28: note: Assuming that condition '!strcmp(e,"c")' is not redundant distcc-3.4/src/filename.c:183:16: note: Condition '!strcmp(e,"c")' is always false Explanation: Only the error path changed. The warning itself is the same and is a true positive: line 181 already handles !strcmp(e,"c") and returns, so the same test in the else-if on line 183 is always false. The 'your' output adds a note pointing to line 181, the earlier condition that causes this. That note is accurate and helps the user understand the warning, so the message became more informative. ---- 13 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dlib/dlib_20.0+dfsg.orig.tar.bz2 Result: your dlib-20.0+dfsg/dlib/threads/threads_kernel_shared.cpp:276:43: style: Condition 'self.function_pointer==0' is always true [knownConditionTrueFalse] dlib-20.0+dfsg/dlib/threads/threads_kernel_shared.cpp:244:46: note: Assuming that condition 'self.function_pointer!=0' is not redundant dlib-20.0+dfsg/dlib/threads/threads_kernel_shared.cpp:276:43: note: Condition 'self.function_pointer==0' is always true Explanation: Both main and the PR report the same knownConditionTrueFalse warning at line 276; only the error path changed. The warning is probably a false positive in both versions: wait_or_timeout() releases the mutex, so another thread can set function_pointer. The PR drops the note 'Assuming condition is false' at line 270. That condition, `self.destruct == true`, has nothing to do with function_pointer. The new addErrorPath filter removes notes about conditions the tracked value does not depend on. The remaining path (the while-loop exit at 244 implies function_pointer == 0) is the actual reasoning, so the message is more accurate even though the questionable warning itself remains. ---- 14 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dolphin-emu/dolphin-emu_2609.b+dfsg.orig.tar.xz Result: your dolphin-emu-2609b/Externals/cpp-ipc/cpp-ipc/test/mem/test_mem_memory_resource.cpp:162:5: style: Unsigned expression '10240u+1024u' can't be negative so it is unnecessary to test it. [unsignedPositive] dolphin-emu-2609b/Externals/cpp-ipc/cpp-ipc/test/mem/test_mem_memory_resource.cpp:159:5: note: Assuming that condition 'dummy.allocated==0' is not redundant dolphin-emu-2609b/Externals/cpp-ipc/cpp-ipc/test/mem/test_mem_memory_resource.cpp:162:5: note: Unsigned positive Explanation: The warning is reported by both versions; only its error path changed. Main added the note 'Assuming condition is false' at line 161. That line is `ASSERT_NE(p, buffer.data())`, which has nothing to do with the tracked value `dummy.allocated` (known to be 0 from the `dummy.allocated==0` assertion at line 159). The PR changes addErrorPath so it no longer records assumptions about conditions that do not involve the tracked value, so this misleading note is gone. Whether the warning itself is useful is unchanged, but its explanation is now more accurate. ---- 15 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/doomsday/doomsday_2.3.1+ds1.orig.tar.xz Result: your doomsday-2.3.1/doomsday/apps/client/src/render/r_draw.cpp:218:34: style: Condition 'vd!=0' is always true [knownConditionTrueFalse] doomsday-2.3.1/doomsday/apps/client/src/render/r_draw.cpp:217:28: note: Assignment 'vd=&DD_Player(displayPlayer)->viewport()', assigned value is never 0 doomsday-2.3.1/doomsday/apps/client/src/render/r_draw.cpp:218:34: note: Condition 'vd!=0' is always true Explanation: The same warning, 'vd!=0' is always true at line 218, is reported by both main and the PR. Only the attached error-path notes differ. 'vd' is assigned the address of a reference ('&...->viewport()'), so it can never be null and the condition inside the assert really is always true. The warning stays a true positive with essentially the same wording, so the change makes no meaningful difference to users. ---- 16 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/d/dune-uggrid/dune-uggrid_2.11.0+dfsg.orig.tar.gz Result: your dune-uggrid-2.11.0+dfsg/dune/uggrid/parallel/ddd/mgr/prio.cc:195:25: style: Condition '*pres!=p1' is always true [knownConditionTrueFalse] dune-uggrid-2.11.0+dfsg/dune/uggrid/parallel/ddd/mgr/prio.cc:194:12: note: Assuming that condition '*pres==p1' is not redundant dune-uggrid-2.11.0+dfsg/dune/uggrid/parallel/ddd/mgr/prio.cc:195:25: note: Condition '*pres!=p1' is always true Explanation: The warning is a true positive in both versions. Line 194 returns whenever `*pres==p1`, so at line 195 `*pres!=p1` must hold. The same warning text appears in both main and your, so only the attached notes changed. Your note, 'Assuming that condition *pres==p1 is not redundant' at 194:12, points at the right condition. Main's notes are not shown, so it is unclear whether this is more accurate. For users the finding is unchanged. ---- 17 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dvdauthor/dvdauthor_0.7.2.orig.tar.gz Result: main dvdauthor-0.7.2/src/dvdcompile.c:1062:68: style: Condition 'ismenu!=VTYPE_VMGM' is always true [knownConditionTrueFalse] dvdauthor-0.7.2/src/dvdcompile.c:973:24: note: Assuming that condition 'ismenu!=VTYPE_VTS' is not redundant dvdauthor-0.7.2/src/dvdcompile.c:1026:25: note: Assuming condition is false dvdauthor-0.7.2/src/dvdcompile.c:1044:24: note: Assuming condition is false dvdauthor-0.7.2/src/dvdcompile.c:1062:68: note: Condition 'ismenu!=VTYPE_VMGM' is always true Explanation: The warning itself is unchanged and is reported by both versions. Only its error path differs. Main also listed the notes 'Assuming condition is false' at line 1026 ('i2 == 0 || i2 >= 128') and line 1044 ('cs->i3 != 0'). Neither of those conditions involves 'ismenu', so they say nothing about why 'ismenu != VTYPE_VMGM' is always true. The PR's addErrorPath filter drops assumptions about conditions that do not mention the tracked value. The remaining path is the assumption at line 973 about 'ismenu != VTYPE_VTS', followed by the conclusion at line 1062. That makes the message more accurate and easier to follow. ---- 18 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dvi2dvi/dvi2dvi_2.0alpha.orig.tar.gz Result: your dvi2dvi-2.0-alpha/virfont.c:315:25: warning:inconclusive: Either the condition '(dvip=(unsigned char*)malloc((unsigned int)dvilen))==NULL' is redundant or there is possible null pointer dereference: dvip. [nullPointerRedundantCheck] dvi2dvi-2.0-alpha/virfont.c:300:48: note: Assuming that condition '(dvip=(unsigned char*)malloc((unsigned int)dvilen))==NULL' is not redundant dvi2dvi-2.0-alpha/virfont.c:315:25: note: Null pointer dereference Explanation: Both versions report the same nullPointerRedundantCheck at line 315 with the same message. The only change is that the error path lost the note 'Assuming condition is true' at line 292 (`if (ce->vfdstat == VFD_UNDEF)`). That condition does not mention dvip, and the remaining note at line 300 already places the path inside that branch, because the malloc only happens there. So the dropped note added little, and the path still shows where the null comes from and where it is dereferenced. The warning itself is likely questionable, since Fatal() probably exits, but that is the same in both versions. The effect on users is negligible. ---- 19 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/ebtables/ebtables_2.0.11.orig.tar.gz Result: main ebtables-2.0.11/useful_functions.c:541:9: style: Condition 'next' is always true [knownConditionTrueFalse] Explanation: Line 539 returns when next == NULL, so 'next' is always true at line 541 and the warning itself is correct. The main warning had no notes. The PR replaces it with a warning that has the same text plus notes ('Assuming that condition next==NULL is not redundant'), which explain where the fact comes from. The two lines differ only by the added notes, so the change is a slightly more informative message. ---- 20 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/focuswriter/focuswriter_1.9.1.orig.tar.xz Result: main focuswriter-1.9.1/src/3rdparty/hunspell/hunspell.cxx:884:26: style: Condition 'pAMgr' is always true [knownConditionTrueFalse] Explanation: The warning at line 884 is not removed. It appears in both outputs with the same text. The 'main' line has no notes and the 'your' line adds a note: 'Assuming that condition pAMgr is not redundant' at line 870. Line 884 sits inside `if (!he && pAMgr)`, so pAMgr is non-null there and the condition really is always true. The finding is a true positive, and only how it is reported changed. Adding the note is at most slightly helpful and does not change what the user is told. ---- 21 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/freetds/freetds_1.5.5+ds.orig.tar.xz Result: your freetds-1.5.5/src/tds/query.c:1437:6: style: Condition 'params' is always false [knownConditionTrueFalse] freetds-1.5.5/src/tds/query.c:1385:30: note: Assuming that condition 'params' is not redundant freetds-1.5.5/src/tds/query.c:1437:6: note: Condition 'params' is always false Explanation: Both versions report the same warning. Earlier in the function there is a branch (line 1385) that returns whenever `params` is non-NULL, so `params` is NULL at line 1437 and the warning is a true positive. The only change is in the error path. The PR drops the note 'Assuming condition is false' at line 1415. That line is the unrelated `tds_set_state(...) != TDS_WRITING` check, which has nothing to do with `params`. The new path names only the condition that actually decides the value, so the message is more accurate. ---- 22 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/getfem/getfem_5.5+dfsg1.orig.tar.xz Result: main getfem-5.5/src/getfem_mat_elem.cc:329:15: style: Condition 'icb' is always true [knownConditionTrueFalse] Explanation: The warning itself is unchanged. 'icb' is checked again at line 329 inside the else branch of 'if (!icb)', so it really is always true there. Only the attached notes differ: the 'your' version now adds the 'Assuming that condition !icb is not redundant' note. The main/your pair is the same true positive, with error-path details slightly reformatted, and that makes no practical difference to users. ---- 23 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gfs2-utils/gfs2-utils_3.6.1.orig.tar.xz Result: main gfs2-utils-3.6.1/gfs2/libgfs2/rgrp.c:346:38: warning: Expression '2048<<20' can have a negative value. That is converted to an unsigned value and used in an unsigned calculation. [signConversion] Explanation: LGFS2_MAX_RGSIZE is 2048, so `2048<<20` is 2^31 computed in signed 32-bit int. That value does not fit in int; in practice it becomes INT_MIN, and strictly it is undefined behaviour in C. It is then converted to unsigned for the division by `sd_bsize`. So 'can have a negative value … converted to an unsigned value' describes the code correctly. After the conversion the result happens to be 2^31, which is what the author intended, so the defect is mostly about UB/portability. The PR's signedness and value-range changes drop this true positive, which makes it a new false negative. ---- 24 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/haskell-argon2/haskell-argon2_1.3.0.1.orig.tar.gz Result: main argon2-1.3.0.1/phc-winner-argon2/src/encoding.c:86:47: error: Signed integer overflow for expression ''0'-52'. [integerOverflow] Explanation: The expression '0' - 52 is a constant int computation: 48 - 52 = -4. That does not overflow a signed int. The value is negative, and adding it to unsigned x wraps in a well-defined way. Main reported a false positive, most likely because the old value types or the sign handling in the integer overflow check treated the subtraction as unsigned or mis-evaluated it. The PR rewrites how common integral types are computed, and that removes the bogus error. ---- 25 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/i/ipset/ipset_7.24.orig.tar.bz2 Result: your ipset-7.24/libltdl/ltdl.c:2438:11: style: Condition 'cur' is always true [knownConditionTrueFalse] ipset-7.24/libltdl/ltdl.c:2435:18: note: Assuming that condition 'handle=lt_dlhandle_iterate(iface,handle)' is not redundant ipset-7.24/libltdl/ltdl.c:2437:23: note: cur is assigned 'handle' here. ipset-7.24/libltdl/ltdl.c:2438:11: note: Condition 'cur' is always true Explanation: The warning is the same in both versions and is a true positive. Inside `while ((handle = lt_dlhandle_iterate(...)))` the body only runs when `handle` is non-null. So `cur = handle` makes the check `cur &&` always true. Only the attached note lines appear to differ. The new notes are accurate: they point to the loop condition and the assignment. Main's notes are not shown, so we cannot tell whether the error path got better or worse. The practical effect for users is negligible. ---- 26 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/j/jabber-muc/jabber-muc_0.8.orig.tar.gz Result: main jabber-muc-0.8/src/jabberd/xmlnode.c:353:77: style: Condition 'name=='\0'' is always false [knownConditionTrueFalse] Explanation: Line 353 compares the pointer `name` with `'\0'` (null), right after `name == NULL` was already ruled out. So `name=='\0'` is always false, and the code probably meant `*name == '\0'`. The warning is a true positive in both versions, with identical text. The PR version adds the note 'Assuming that condition name==NULL is not redundant', which correctly explains where the fact comes from. The main version's notes are not shown, so whether this is an improvement cannot be confirmed, but the new output is accurate and at least as informative. ---- 27 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/j/junixsocket/junixsocket_2.10.1.orig.tar.xz Result: your junixsocket-junixsocket-2.10.1/junixsocket-native/src/main/c/send.c:136:15: style: Condition 'ancFds!=NULL' is always true [knownConditionTrueFalse] junixsocket-junixsocket-2.10.1/junixsocket-native/src/main/c/send.c:125:16: note: Assuming that condition 'ancFds==NULL' is not redundant junixsocket-junixsocket-2.10.1/junixsocket-native/src/main/c/send.c:136:15: note: Condition 'ancFds!=NULL' is always true Explanation: Both main and the PR report the same warning at send.c:136:15 with the same text. Only the error-path notes differ, so this is a change in the diff output, not in the finding. The warning is correct: line 125 returns early when ancFds==NULL, so 'ancFds!=NULL' at line 136 is always true. The notes point to the condition at line 125, which is the right reason. Nothing changes for users in any meaningful way. ---- 28 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/l/lp-solve/lp-solve_5.5.2.14.orig.tar.gz Result: your lp_solve/colamd/colamd.c:1131:9: style: Condition '!mark' is always false [knownConditionTrueFalse] lp_solve/colamd/colamd.c:1123:9: note: Assuming that condition '!count' is not redundant lp_solve/colamd/colamd.c:1122:11: note: count is assigned '(int*)((*allocate)(n+1,sizeof(int)))' here. lp_solve/colamd/colamd.c:1130:12: note: Assignment 'mark=(int*)((*allocate)(n+1,sizeof(int)))', assigned value is symbolic=count lp_solve/colamd/colamd.c:1131:9: note: Condition '!mark' is always false Explanation: The warning is a false positive in both versions. `mark` and `count` come from two separate `allocate()` calls, which return different memory, so `mark` being non-null is not implied by `count` being non-null. Cppcheck wrongly treats `mark` as symbolically equal to `count` because the allocation expression is the same. Main and the PR report the same warning text at the same location; only the attached note lines differ, and main's notes are not shown. The PR neither fixes nor worsens this false positive in a way that matters to users. ---- 29 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lucene8/lucene8_8.8.1.orig.tar.xz Result: main lucene-8.8.1/misc/src/java/org/apache/lucene/store/NativePosixUtil.cpp:203:20: style: Condition 'numBytesRead==-1' is always false [knownConditionTrueFalse] Explanation: `numBytesRead` is a `size_t` holding the result of `pread`, which returns `ssize_t`. When `pread` fails it returns -1, and the assignment converts that to SIZE_MAX. In `numBytesRead == -1`, the `-1` is also converted to `size_t` (SIZE_MAX), so the comparison is true exactly on the error path. Main's claim that the condition is always false was a false positive. The PR treats mixed-sign comparisons in the unsigned domain (castConstantToOperandType, getCommonIntegralType), which removes it. ---- 30 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libc/libcupsfilters/libcupsfilters_2.1.1.orig.tar.gz Result: main libcupsfilters-2.1.1/cupsfilters/pwgtopdf.cxx:940:15: style: Condition 'doc->cm_disabled' is always true [knownConditionTrueFalse] Explanation: Both main and the PR report the same warning at the same location with identical text. The code is `if (!doc->cm_disabled) {...} else if (doc->cm_disabled)`, so the else-if condition is always true and the warning is a true positive in both versions. The diff entry most likely comes from a small change in the attached notes/error path; the PR version shows a correct note pointing at line 875. The main version's notes are not shown, so any improvement cannot be confirmed, but the reported diagnostic is unchanged for users. ---- 31 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libd/libdisasm/libdisasm_0.23.orig.tar.gz Result: main libdisasm-0.23/libdisasm/x86_format.c:296:31: style: Condition '!int op->flags&0xF00' is always false [knownConditionTrueFalse] Explanation: The warning text is identical in main and in the PR, so only the attached notes or error path changed. The warning itself is a true positive. `! (int) op->flags & 0xF00` parses as `(!(int)op->flags) & 0xF00`, and since `!x` is 0 or 1, the result ANDed with 0xF00 is always 0. The PR's note about assuming `!op->flags` (line 290) is not redundant is reasonable. The diff does not show main's notes, so the change cannot be judged better or worse, and the warning is still reported. ---- 32 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libg/libgdata/libgdata_0.18.1.orig.tar.xz Result: your libgdata-0.18.1/gdata/tests/documents.c:2163:42: style: Condition 'l!=UPLOAD_ODT_CONVERT' is always true [knownConditionTrueFalse] libgdata-0.18.1/gdata/tests/documents.c:2154:13: note: Assuming that condition 'l==UPLOAD_ODT_CONVERT' is not redundant libgdata-0.18.1/gdata/tests/documents.c:2163:42: note: Condition 'l!=UPLOAD_ODT_CONVERT' is always true Explanation: The warning itself is correct. After the 'if (l == UPLOAD_ODT_CONVERT) continue;' at line 2154, 'l != UPLOAD_ODT_CONVERT' must be true at line 2163. The PR drops the note 'Assuming condition is false' at line 2159. That note pointed at 'if (i == UPLOAD_METADATA_ONLY && k == UPLOAD_RESUMABLE)', which does not involve 'l' and has nothing to do with why the condition is always true. This matches the PR's addErrorPath change, which skips conditions that do not reference the tracked value. The error path is now more accurate. ---- 33 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libp/libpam-ccreds/libpam-ccreds_10.orig.tar.gz Result: main pam_ccreds-10/cc_db.c:259:10: style: Condition 'db!=NULL' is always true [knownConditionTrueFalse] Explanation: Both versions report the same warning, and it is a true positive. `db` is assigned from `*db_p` inside `if (*db_p != NULL)`, so `db != NULL` is always true. Only the attached notes differ. The new error path (assuming `*db_p != NULL`, then `db` assigned `*db_p`, then the condition) is accurate and relevant. Main's notes are not shown, so we cannot tell whether the message got better. The user-visible finding is unchanged. ---- 34 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mfoc/mfoc_0.10.7+git20180724.orig.tar.xz Result: your src/slre.c:86:52: style: Condition 're[0]=='\\'' is always false [knownConditionTrueFalse] src/slre.c:86:16: note: Assuming that condition 're[0]=='\\'' is not redundant src/slre.c:86:52: note: Condition 're[0]=='\\'' is always false Explanation: In `re[0] == '\\' && re[1] == 'x' ? 4 : re[0] == '\\' ? 2 : 1`, the second `re[0]=='\\'` is reached when `re[0]=='\\'` but `re[1]!='x'`, so it can be true. The 'always false' warning is a false positive in both main and the PR. The PR does not add or remove it; the only change is an extra note pointing at the first condition at column 16. That note just exposes the same faulty reasoning, which wrongly treats the false branch of `&&` as implying `re[0]!='\\'`. Users still see the same false positive with essentially the same meaning. ---- 35 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncl/ncl_6.6.2.dfsg.1.orig.tar.xz Result: your ncl-6.6.2.dfsg.1/ni/src/ncl/NclHLUObj.c:67:9: style: Condition 'tmp!=NULL' is always true [knownConditionTrueFalse] ncl-6.6.2.dfsg.1/ni/src/ncl/NclHLUObj.c:61:25: note: Assuming that condition 'theobj->obj.parents==NULL' is not redundant ncl-6.6.2.dfsg.1/ni/src/ncl/NclHLUObj.c:66:6: note: tmp is assigned 'theobj->obj.parents' here. ncl-6.6.2.dfsg.1/ni/src/ncl/NclHLUObj.c:67:9: note: Condition 'tmp!=NULL' is always true Explanation: The warning is reported at the same location by both main and your; only the error path notes changed. Line 61 returns early when theobj->obj.parents is NULL, and line 66 assigns tmp from it, so 'tmp!=NULL' on line 67 is indeed always true. The new message gives a correct, clear explanation: it names the condition, the assignment, and the conclusion. That makes it more informative and accurate than main's version, which had no path notes at all. ---- 36 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/network-manager-applet/network-manager-applet_1.36.0.orig.tar.xz Result: main network-manager-applet-1.36.0/src/connection-editor/page-mobile.c:165:19: style: Condition 'method' is always true [knownConditionTrueFalse] Explanation: Line 160 returns early when `canceled || !method`, so `method` is non-null at line 165 and 'Condition method is always true' is a true positive. Both versions report it, but the PR's version adds an error path pointing to the condition `!method` at line 160, which is exactly why the condition is redundant. The main output shows no notes for this warning, so the comparison is partly inferred. The new note is accurate and relevant, which makes the diagnostic slightly more informative. ---- 37 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/odr-dabmux/odr-dabmux_5.5.1.orig.tar.gz Result: main Opendigitalradio-ODR-DabMux-8797a5c/lib/Socket.cpp:193:18: style: Condition 'port==0' is always false [knownConditionTrueFalse] Explanation: This is a pair of lines for the same warning at line 193. The warning is a true positive both before and after the change: line 170 returns early when port == 0, so 'port == 0' at line 193 is always false. The only difference is the error path. The new output adds the note 'Assuming that condition port==0 is not redundant' at line 170. The listed main line may also have had notes that are not shown, so the change appears to be only in note or path details. The warning itself is unchanged, so this does not matter to users. ---- 38 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/openni/openni_1.5.4.0+dfsg.orig.tar.xz Result: your openni-1.5.4.0+dfsg/Platform/Android/jni/External/libusb-1.0.8/libusb/sync.c:180:11: style: Condition '!completed' is always true [knownConditionTrueFalse] openni-1.5.4.0+dfsg/Platform/Android/jni/External/libusb-1.0.8/libusb/sync.c:174:9: note: Assuming that condition '!completed' is not redundant openni-1.5.4.0+dfsg/Platform/Android/jni/External/libusb-1.0.8/libusb/sync.c:180:11: note: Condition '!completed' is always true Explanation: Both main and the PR report the same warning at line 180. Only the notes changed: the PR's new `addErrorPath` filter dropped the 'Assuming condition is true/false' notes for lines 176, 177 and 181, because those conditions do not mention `completed`. The warning itself is a false positive in both versions. `completed` is set through a pointer by `bulk_transfer_cb`, which `libusb_handle_events()` invokes, so after `libusb_cancel_transfer` the loop condition can really be true or false. Dropping some path notes makes the path a bit shorter: the notes at 176 and 177 showed how execution reached line 180, while the one at 181 was oddly placed. Neither version makes the false positive more or less correct, so the change does not matter to users. ---- 39 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ophcrack/ophcrack_3.8.0.orig.tar.bz2 Result: main ophcrack-3.8.0/src/core/hash.c:261:9: style: Condition 'l>=7' is always true [knownConditionTrueFalse] ophcrack-3.8.0/src/core/hash.c:159:9: note: Assuming that condition 'l>=7' is not redundant ophcrack-3.8.0/src/core/hash.c:209:19: note: Assuming condition is false ophcrack-3.8.0/src/core/hash.c:261:9: note: Condition 'l>=7' is always true Explanation: The warning that 'l>=7' is always true at line 261 is still reported. The only change is that the note 'Assuming condition is false' at hash.c:209:19 is gone from its error path. The PR adds a filter in SingleValueFlowAnalyzer::addErrorPath that drops conditions which neither are the value's own condition nor mention the tracked variable. So the removed note was almost certainly an unrelated condition that does not involve 'l'. The remaining path (assumption at line 159, then line 261) is the relevant reasoning, so the message is more accurate. Line 209 is not shown, which limits confidence. ---- 40 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/pdfjs-openjpeg/pdfjs-openjpeg_0.0~git20260423+ds.orig.tar.xz Result: your pdfjs-openjpeg-0.0~git20260423+ds/openjpeg/src/bin/jp2/convert.c:1819:28: style: Condition 'header_info.height!=0' is always true [knownConditionTrueFalse] pdfjs-openjpeg-0.0~git20260423+ds/openjpeg/src/bin/jp2/convert.c:1812:35: note: Assuming that condition 'header_info.height==0' is not redundant pdfjs-openjpeg-0.0~git20260423+ds/openjpeg/src/bin/jp2/convert.c:1819:28: note: Condition 'header_info.height!=0' is always true Explanation: The warning is a true positive. The early return at lines 1811-1816 exits when `header_info.height == 0`, so `header_info.height != 0` at line 1819 is always true. Both versions report it. The PR's version adds an error path that points to the condition at line 1812 that causes it. This makes the message easier to understand and act on, so it is a small accuracy improvement rather than a new or removed finding. ---- 41 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plzip/plzip_1.13.orig.tar.xz Result: your plzip-1.13/lzip_index.cc:234:26: style: Comparing expression of type 'const signed long long' against value 9223372036854775807. Condition is always false. [compareValueOutOfTypeRangeError] Explanation: `end` is a `long long` (64-bit), and `INT64_MAX` (9223372036854775807) is the largest value that type can hold. So `end > INT64_MAX` can never be true, and the warning about that sub-comparison is correct. The old code skipped every type of 63 bits or more; the PR now handles 64-bit types and reports this new true positive. The check is defensive code in plzip, and the user may consider it intentional, but the diagnosis is accurate. ---- 42 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/pnetcdf/pnetcdf_1.15.1.orig.tar.xz Result: your pnetcdf-1.15.1/src/dispatchers/cdl_header_parser.c:948:16: style: Condition 'header==NULL' is always false [knownConditionTrueFalse] pnetcdf-1.15.1/src/dispatchers/cdl_header_parser.c:942:51: note: Assuming that condition 'cdl_filelist[hid]==NULL' is not redundant pnetcdf-1.15.1/src/dispatchers/cdl_header_parser.c:945:12: note: header is assigned 'cdl_filelist[hid]' here. pnetcdf-1.15.1/src/dispatchers/cdl_header_parser.c:948:16: note: Condition 'header==NULL' is always false Explanation: Both main and your report this warning. Only the error path changed: the PR now adds notes explaining why the condition is always false. The code returns early if cdl_filelist[hid]==NULL, then assigns header = cdl_filelist[hid], so 'header==NULL' at line 948 really is always false. The warning is a true positive either way, and the added notes ('Assuming that condition ... is not redundant', 'header is assigned ... here') point to the correct source of the fact. The message became more informative. ---- 43 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/pythonqt/pythonqt_4.1.0.orig.tar.gz Result: your MeVisLab-pythonqt-3215c62/generator/simplecpp/simplecpp.cpp:3702:87: warning: Either the condition 'tok=tok->next' is redundant or there is possible null pointer dereference: tok. [nullPointerRedundantCheck] MeVisLab-pythonqt-3215c62/generator/simplecpp/simplecpp.cpp:3692:49: note: Assuming that condition 'tok=tok->next' is not redundant MeVisLab-pythonqt-3215c62/generator/simplecpp/simplecpp.cpp:3702:87: note: Null pointer dereference Explanation: The warning itself is unchanged and is a true positive. In the `systemheader` branch, `while ((tok = tok->next) && tok->op != '>')` can end with `tok == nullptr` when no `>` is found. Line 3702 then dereferences `tok->location` unconditionally. Only the error path changed: the PR's new `addErrorPath` filter dropped the note "3691:37: Assuming condition is true" because `systemheader` does not mention `tok` directly. That condition is relevant, though: the null dereference is only reachable when `systemheader` is true. The new path is therefore slightly less informative. The impact is small, since the remaining note at 3692 already lies inside that branch. ---- 44 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qutemol/qutemol_0.4.1~cvs20081111.orig.tar.gz Result: your qutemol/src/saveSnapDialog.cpp:103:11: style: Condition 'text' is always true [knownConditionTrueFalse] qutemol/src/saveSnapDialog.cpp:101:9: note: Assuming that condition 'text' is not redundant qutemol/src/saveSnapDialog.cpp:103:11: note: Condition 'text' is always true Explanation: The warning at line 103 is the same in both versions: the nested `if (text)` sits inside an `if (text)` block, so it is always true. That is a true positive. The PR only changed the note text, and the result shows the version from the PR. The new note 'Assuming that condition 'text' is not redundant' points to the outer condition at line 101. That is the condition the warning depends on, so the message is at least as accurate as before and probably more so. ---- 45 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qvge/qvge_0.7.0.orig.tar.gz Result: main qvge-0.7.0/src/3rdParty/qsint-widgets/colorgrid.cpp:81:23: style: Condition 'm_colors' is always true [knownConditionTrueFalse] Explanation: The same knownConditionTrueFalse warning at colorgrid.cpp:81 is reported by both main and your, so it was not really removed. Only the extra note lines differ, which shows the 'main' line paired with an identical 'your' line plus notes. The warning itself is still correct: `list` is checked non-null at line 77, so after `m_colors = list` the `m_colors` check at line 81 is always true. The message is unchanged in substance. ---- 46 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-rniftilib/r-cran-rniftilib_0.0-35.r79.orig.tar.xz Result: main r-cran-rniftilib-0.0-35.r79/src/nifti1_io.c:2548:9: style: Condition 'ext' is always true [knownConditionTrueFalse] Explanation: Line 2542 returns early when `ext == NULL`, so `ext` is always non-null at line 2548. The redundant `ext &&` check is correctly flagged by both versions. The PR keeps the same true positive. The only visible difference is that the new output carries an error path pointing to the earlier `ext==NULL` check, which explains why the condition is always true. The added note is accurate and more helpful, so this counts as a slightly more informative message. ---- 47 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sgf2dg/sgf2dg_4.252.orig.tar.gz Result: your Games-Go-Sgf2Dg-4.252/sgf2mpost/sgf2mpost.c:308:7: style: Condition '!mpfile' is always false [knownConditionTrueFalse] Games-Go-Sgf2Dg-4.252/sgf2mpost/sgf2mpost.c:298:7: note: Assuming that condition '!mpfile' is not redundant Games-Go-Sgf2Dg-4.252/sgf2mpost/sgf2mpost.c:308:7: note: Condition '!mpfile' is always false Explanation: The warning is a true positive in both versions. If mpfile is null at line 298 the function returns, so '!mpfile' at line 308 is always false, unless load_sgf changes mpfile, which it cannot because the pointer is passed by value. The PR only adds an error-path note pointing to the earlier check at line 298. That makes the message easier to understand, so it is a small improvement. ---- 48 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/thc-ipv6/thc-ipv6_3.8.orig.tar.gz Result: main thc-ipv6-3.8/thc-ipv6-lib.c:367:14: style: Condition 'data!=NULL' is always true [knownConditionTrueFalse] Explanation: The warning is a true positive in both versions: line 347 returns early when data == NULL, so 'data != NULL' at line 367 is always true. Only the note list changed. The main output carried no explanatory notes for this warning. The PR's output adds the note 'Assuming that condition data==NULL is not redundant' at line 347, which is the condition that actually makes line 367 redundant. The message is the same and the explanation is more accurate, so this is a small improvement. ---- 49 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/uclibc/uclibc_1.0.54.orig.tar.xz Result: your uClibc-ng-1.0.54/ldso/ldso/aarch64/elfinterp.c:130:14: style: Condition 'res>0' is always true [knownConditionTrueFalse] uClibc-ng-1.0.54/ldso/ldso/aarch64/elfinterp.c:117:10: note: Assuming that condition 'res==0' is not redundant uClibc-ng-1.0.54/ldso/ldso/aarch64/elfinterp.c:126:7: note: Assuming condition is false uClibc-ng-1.0.54/ldso/ldso/aarch64/elfinterp.c:130:14: note: Condition 'res>0' is always true Explanation: The `res>0` warning itself is correct. After `if (res==0) continue;` and the `res < 0` branch, `res` must be positive in the `else if`. The only change is in the error path. The note for line 122 (`if (symtab_index)`) was dropped. That condition has nothing to do with `res`, so the note was misleading. The remaining notes (`res==0` and `res<0`) are exactly the ones that justify the warning, so the message is now more accurate. ---- 50 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vino/vino_3.22.0.orig.tar.xz Result: your vino-3.22.0/server/miniupnp/miniupnpc.c:107:48: style: Condition 'line[linelen]!='\r'' is always true [knownConditionTrueFalse] vino-3.22.0/server/miniupnp/miniupnpc.c:107:23: note: Assuming that condition 'line[linelen]!='\r'' is not redundant vino-3.22.0/server/miniupnp/miniupnpc.c:107:48: note: Condition 'line[linelen]!='\r'' is always true Explanation: Line 107 is `line[linelen] != '\r' && line[linelen] != '\r'`. The same comparison appears twice, so if the first operand is true the second is always true. That makes the warning a true positive, and the code most likely meant '\n' in the second check. The warning text and location did not change. The only difference is that the new output adds error-path notes ('Assuming that condition ... is not redundant' and 'Condition ... is always true'). These explain to the user why the condition is redundant, so the message is more informative. The parallel change in sockets.c, which only gained the same kind of notes, supports this reading.