AI review of 2026-11-13_07-49-01-a66da095f678-results.txt PR: #8819 https://github.com/cppcheck-opensource/cppcheck/pull/8819 Tested: a66da095f6787020eefef56dca6348332be42f55 Merge base: 103143dcb6f67ba38d64e5eb390d77a9250790cb Reviewed: 2026-11-16 22:28:33 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 4905 in the report (random sample), 153 not reviewed: valueFlowMaxIterations Verdicts: 1 acceptable regression, 19 improvement, 27 neutral, 3 regression Tokens: 149220 input, 3768639 cache read, 76911 cache write, 22417 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/3/389-ds-base/389-ds-base_3.3.1.orig.tar.bz2 Result: your 389-ds-base-3.3.1/ldap/servers/plugins/uiduniq/7bit.c:740:9: style: Condition 'plugin_type' is always true [knownConditionTrueFalse] 389-ds-base-3.3.1/ldap/servers/plugins/uiduniq/7bit.c:739:22: note: Assuming that condition 'plugin_type=slapi_entry_attr_get_ref(plugin_entry,"nsslapd-plugintype")' is not redundant 389-ds-base-3.3.1/ldap/servers/plugins/uiduniq/7bit.c:740:9: note: Condition 'plugin_type' is always true Explanation: The main and your lines report the same warning at the same location. Only the attached notes appear in the diff output, so the text is effectively unchanged. The warning is a true positive: 'plugin_type' was already tested as the result of the assignment in the previous '&&' operand, so the second test on line 740 is redundant. The pull request does not change what users see. ---- 2 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/alsaplayer/alsaplayer_0.99.82.orig.tar.gz Result: your alsaplayer-0.99.82/input/flac/FlacSeekableStream.cpp:350:9: style: Condition '!f' is always false [knownConditionTrueFalse] alsaplayer-0.99.82/input/flac/FlacSeekableStream.cpp:343:9: note: Assuming that condition '!client_data' is not redundant alsaplayer-0.99.82/input/flac/FlacSeekableStream.cpp:349:30: note: Assignment 'f=(FlacSeekableStream*)client_data', assigned value is never 0 alsaplayer-0.99.82/input/flac/FlacSeekableStream.cpp:350:9: note: Condition '!f' is always false Explanation: Main already reported this same warning without notes. The PR adds an error path that explains it. At line 343 `client_data` is checked and the function returns if it is null. `f` is then assigned from `client_data`, so `!f` at line 350 really is always false. The warning is a true positive, and the new notes ('Assuming that condition !client_data...', 'assigned value is never 0') make the message more accurate and informative. ---- 3 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/btop/btop_1.4.7.orig.tar.gz Result: main aristocratos-btop-d43a485/src/linux/intel_gpu_top/intel_gpu_top.c:308:27: style: Condition 'engine->busy.config==-1' is always false [knownConditionTrueFalse] Explanation: `engine->busy.config` is a `uint64_t`, and `get_pmu_config()` returns `uint64_t` with `return -1` on its error paths. Comparing `config == -1` converts -1 to UINT64_MAX, which matches the error value, so the condition can be true. The old 'always false' warning came from treating -1 as a signed value outside the unsigned range. The PR reads the constant in the comparison's common type (castConstantToOperandType, mixed-sign handling), so this false positive is gone. ---- 4 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/cpufrequtils/cpufrequtils_008.orig.tar.bz2 Result: your cpufrequtils-008/lib/cpufreq.c:216:6: style: Condition 'ret' is always true [knownConditionTrueFalse] cpufrequtils-008/lib/cpufreq.c:215:36: note: Calling function 'sysfs_modify_policy_governor' returns !0 cpufrequtils-008/lib/cpufreq.c:216:6: note: Condition 'ret' is always true Explanation: Main and the PR report the same warning, with the same text, at cpufreq.c:216. The diff only reflects a change in the attached notes or error path; the PR now shows 'sysfs_modify_policy_governor returns !0'. The same pattern appears at all six call sites. The PR neither added nor removed this diagnostic. Whether the warning is right depends on how sysfs_modify_policy_governor is visible in this translation unit, and that is unchanged. A change in note wording alone does not matter to users. ---- 5 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/ctk/ctk_2026.09.02.orig.tar.gz Result: your ctk-2026.09.02/Libs/Widgets/ctkCoordinatesWidget.cpp:672:48: style: Condition 'oldestElement!=-1' is always true [knownConditionTrueFalse] ctk-2026.09.02/Libs/Widgets/ctkCoordinatesWidget.cpp:669:18: note: Assignment 'i=0', assigned value is 0 ctk-2026.09.02/Libs/Widgets/ctkCoordinatesWidget.cpp:672:14: note: Assuming that condition 'i==oldestElement' is not redundant ctk-2026.09.02/Libs/Widgets/ctkCoordinatesWidget.cpp:672:48: note: Condition 'oldestElement!=-1' is always true Explanation: In the loop `for (int i = 0; ...; ++i)`, `i` is never negative. Inside `(i == oldestElement && oldestElement != -1)`, `i == oldestElement` therefore implies `oldestElement >= 0`, so `oldestElement != -1` is redundant and always true. The warning is a true positive in both versions, with the same location and text. Only the error-path notes differ. The new notes (i=0, assuming i==oldestElement) give a plausible justification, and main's notes are not shown, so the change cannot be judged better or worse. It does not matter to users. ---- 6 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/cubew/cubew_4.7.orig.tar.gz Result: main cubew-4.7/src/cubew/cubew_cartesian.c:183:25: style: Condition 'dim>=cart->ndims' is always false [knownConditionTrueFalse] cubew-4.7/src/cubew/cubew_cartesian.c:183:14: note: Assuming that condition 'dim<0' is not redundant cubew-4.7/src/cubew/cubew_cartesian.c:183:25: note: Condition 'dim>=cart->ndims' is always false Explanation: The condition `dim < 0 && dim >= cart->ndims` mixes an `int` with `ndims`. `ndims` is printed with `%u`, so it is most likely unsigned (struct definition not shown, hence medium confidence). In that case `dim` is converted to unsigned for the second comparison. A negative `dim` becomes a huge value that is normally >= ndims, so the second condition is usually true, not always false. Main reasoned in the signed domain (ndims >= 0 and dim <= -1, so false). That is exactly the mixed-sign mistake the PR fixes in parseCompareEachInt/restrictToUnsignedDomain. The code itself is buggy (should be `||`), but the 'always false' claim was a false positive, and removing it is correct. ---- 7 / 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/Source/Core/DolphinQt/QtUtils/ClearLayoutRecursively.cpp:14:15: style: Condition 'child==nullptr' is always false [knownConditionTrueFalse] dolphin-emu-2609b/Source/Core/DolphinQt/QtUtils/ClearLayoutRecursively.cpp:12:29: note: Assuming that condition 'child=layout->takeAt(0)' is not redundant dolphin-emu-2609b/Source/Core/DolphinQt/QtUtils/ClearLayoutRecursively.cpp:14:15: note: Condition 'child==nullptr' is always false Explanation: Inside `while (QLayoutItem* child = layout->takeAt(0))` the loop body only runs when `child` is non-null, so `child == nullptr` is always false. The warning is a true positive, and the PR keeps it. The only difference is that the new version adds an error-path note explaining the reasoning: the condition `child=layout->takeAt(0)` is assumed not redundant. This makes the message more informative, a small improvement. ---- 8 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/excellent-bifurcation/excellent-bifurcation_0.0.20071015.orig.tar.gz Result: your excellent-bifurcation-0.0.20071015/src/level.c:357:30: style: Condition 'track[t].multiple==0' is always false [knownConditionTrueFalse] excellent-bifurcation-0.0.20071015/src/level.c:351:59: note: Assuming that condition 'track[t].multiple==0' is not redundant excellent-bifurcation-0.0.20071015/src/level.c:355:25: note: Assuming condition is true excellent-bifurcation-0.0.20071015/src/level.c:357:30: note: Condition 'track[t].multiple==0' is always false Explanation: Both main and the PR report the same warning at the same location with the same text. The diff only shows a different notes/error-path rendering. At line 351 the loop does `continue` when track[t].multiple == 0, and nothing in between modifies multiple. So the check at line 357 is indeed always false, and the warning is a true positive in both versions. The output change does not matter to users. ---- 9 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/featherpad/featherpad_1.6.4.orig.tar.xz Result: main FeatherPad-1.6.4/featherpad/sidepane.cpp:66:26: style: Condition 'previous!=nullptr' is always true [knownConditionTrueFalse] Explanation: The warning is reported by both versions at the same location with the same text. Only its note/error-path lines differ, which is why it shows up as a removed line paired with an identical added line. The warning itself is a true positive. The code returns early when `current == previous`, and inside the `current == nullptr` branch that means `previous != nullptr` must hold. So the condition really is always true. The user sees the same warning either way, so the change does not matter. ---- 10 / 50 ---- Verdict: NEUTRAL (low confidence) Package: https://ftp.debian.org/debian/pool/main/g/geners/geners_0.0~svn60+ds.orig.tar.xz Result: your geners-0.0~svn60/geners/BinaryArchiveBase.cc:279:27: style: Condition 'modeIn' is always true [knownConditionTrueFalse] geners-0.0~svn60/geners/BinaryArchiveBase.cc:277:13: note: Assuming that condition '!modeIn' is not redundant geners-0.0~svn60/geners/BinaryArchiveBase.cc:279:27: note: Condition 'modeIn' is always true Explanation: Both versions report the same warning at the same location: 'modeIn' is always true at line 279. This is a true positive. The early 'if (!modeIn) return true;' guarantees modeIn is non-null, so the ternary 'modeIn ? modeIn : ""' is redundant. The only difference is the attached error-path notes. The new notes ('Assuming that condition '!modeIn' is not redundant' at line 277) are correct and point to the guarding condition. Main's notes are not shown, so it cannot be told whether the message got more informative. Either way, users still get the same correct warning. ---- 11 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnuastro/gnuastro_0.24.orig.tar.gz Result: main gnuastro-0.24/lib/fits.c:1207:13: style: Condition 'usesdash' is always true [knownConditionTrueFalse] Explanation: The same knownConditionTrueFalse warning for 'usesdash' at fits.c:1207 is reported by both main and the PR. Only the attached note/error-path lines differ, so the main/your pair is just a re-rendering of the same diagnostic. On the code itself, the outer check only rules out usesdash==0 && usesslash==0, so usesdash can still be 0 when usesslash is 1. That makes the warning look like a false positive in both versions. Nothing changes for users. ---- 12 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/goo/goo_0.155+ds.orig.tar.xz Result: main goo-0.155/src/samurui/treegoo.c:474:14: style: Condition 'parent==tree_goo->root' is always false [knownConditionTrueFalse] Explanation: Line 471 returns early when `parent == tree_goo->root`, so the same check at line 474 is always false. This is a true positive in both versions. The main and your lines are the same warning; only the note lines (the error path) differ in how the diff renders them. The warning is still reported, so nothing changes for users. ---- 13 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/goobox/goobox_3.6.0.orig.tar.xz Result: main goobox-3.6.0/src/gnome-desktop-thumbnail.c:373:17: style: Condition 'bytes_read==-1' is always false [knownConditionTrueFalse] Explanation: `bytes_read` holds the result of `g_input_stream_read()`, which returns -1 on error, so `bytes_read == -1` can be true at runtime and the 'always false' claim is wrong. The likely cause is that main treated an unsigned or mismatched type as unable to hold -1. Under the usual conversions, -1 compares equal to the type's maximum value, so the comparison is reachable. The PR reworks mixed-sign comparison handling, which explains why this false positive is gone. The declaration of `bytes_read` is not shown, hence medium confidence. ---- 14 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/h/hardinfo/hardinfo_2.3.1.orig.tar.gz Result: main hardinfo2-hardinfo2-ebc19f3/modules/network.c:312:16: style: Condition 'p' is always true [knownConditionTrueFalse] Explanation: The same warning, 'Condition 'p' is always true', is reported by both versions at the same location. Only the attached notes differ. It is a true positive: inside `if(spawned && out)`, `p=out` is non-null, so `if(p)` at line 312 is always true. The PR's notes trace this correctly: out is assumed non-null, then p is assigned from out. The removed line is just the old form of the same message, so users see no meaningful change. ---- 15 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/haskell-hslua-list/haskell-hslua-list_1.1.4.orig.tar.gz Result: main hslua-list-1.1.4/cbits/listmod.c:35:29: style: Condition '0u-(unsigned long)pos>len' is always false [knownConditionTrueFalse] Explanation: `posrelat` only reaches line 35 when `pos < 0`. Then `0u - (size_t)pos` is the magnitude of `pos` as an unsigned value, so it can exceed `len` (e.g. pos = -10, len = 3), and the function correctly returns 0 in that case. The condition is not always false, so main's knownConditionTrueFalse was a false positive. It most likely came from treating the unsigned subtraction 0u - x as non-wrapping. The PR adds wrap-aware handling of unsigned arithmetic and stops propagating such bounds, which removes the false positive. ---- 16 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/iec16022/iec16022_0.3.1.orig.tar.xz Result: main iec16022-0.3.1/iec16022ecc200.c:335:21: style: Condition 'enc=='x'' is always false [knownConditionTrueFalse] Explanation: Both main and the PR report the same warning at line 335: `else if (enc == 'x')` is always false, because `enc == 'x'` is already handled by the preceding `if`. This is a true positive. The only difference is that the PR's version carries an error path: a note pointing to the earlier `enc=='x'` test at line 333 and a note at line 335. The diagnostic itself, its location and its correctness are unchanged, so this does not matter to users. ---- 17 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/inventor/inventor_2.1.6.1+ds.orig.tar.xz Result: main inventor-2.1.6.1+ds/apps/demos/noodle/WorldInfo.c++:266:20: style: Condition 'victimPath!=NULL' is always true [knownConditionTrueFalse] Explanation: After `if (!victimPath) return;` at line 262, the check `victimPath != NULL` at line 266 is redundant, so the warning is a true positive. Both main and the PR report it. The only difference is that the PR version adds notes to the message (the 'Assuming that condition ... is not redundant' note shown in the diff). The 'main' line has no notes and the 'your' line has the same text with notes, so this is a formatting or error-path difference, not a removed warning. Users see essentially the same diagnostic. ---- 18 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/ipxe/ipxe_2.0.0+dfsg.orig.tar.xz Result: main ipxe-2.0.0/src/drivers/net/etherfabric.c:3532:2: error: Signed integer overflow for expression '0-1'. [integerOverflow] Explanation: The `EFAB_POPULATE_OWORD_*` macros expand to bitfield insert expressions such as `(low > min) ? value << (low - min) : value >> (min - low)`, built from small integer constants. The removed warning claims that '0-1' is a signed integer overflow, which is impossible: 0-1 = -1 fits in int. If the operands are unsigned instead, the result is well-defined wraparound, not signed overflow. The subtraction also sits in a ternary branch that is not taken for these constant field positions. The warning was a false positive, so removing it is an improvement. ---- 19 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/j/julia/julia_1.5.3+dfsg.orig.tar.xz Result: main julia-1.5.3/src/iddict.c:67:32: style: Condition 'empty_slot==-1' is always false [knownConditionTrueFalse] Explanation: `empty_slot` is a size_t and is set to -1, which converts to SIZE_MAX. Comparing it with -1 also converts -1 to SIZE_MAX, so `empty_slot == -1` is true on the first iteration. The 'always false' warning was a false positive. It came from mishandling the unsigned conversion: the value was truncated or treated as impossible, and the comparison was not done in the unsigned domain. The PR handles mixed-sign comparisons and value truncation correctly, so this false positive is gone. ---- 20 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/l/linuxtv-dvb-apps/linuxtv-dvb-apps_1.1.1+rev1500.orig.tar.bz2 Result: your dvb-apps-3ee111da5b3a/util/alevt/vbi.c:318:27: style: Condition 'tried_devices!=NULL' is always true [knownConditionTrueFalse] dvb-apps-3ee111da5b3a/util/alevt/vbi.c:310:27: note: Assuming that condition 'tried_devices==NULL' is not redundant dvb-apps-3ee111da5b3a/util/alevt/vbi.c:313:36: note: Assuming condition is false dvb-apps-3ee111da5b3a/util/alevt/vbi.c:316:17: note: Assuming condition is true dvb-apps-3ee111da5b3a/util/alevt/vbi.c:318:27: note: Condition 'tried_devices!=NULL' is always true Explanation: Both main and the PR report the same warning at the same location. Only the error-path notes attached to it differ. At line 310, a NULL `tried_devices` leads to `out_of_mem(-1)`, which in alevt terminates the program. So `tried_devices` is non-NULL by line 318, and the `!= NULL` check is genuinely redundant. The warning was right before and is still right, and the different notes do not change what the user sees in any meaningful way. ---- 21 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libf/libfsxfs/libfsxfs_20240501.orig.tar.gz Result: your libfsxfs-20240501/libbfio/libbfio_memory_range_io_handle.c:710:15: style: Comparing expression of type 'signed long' against value 9223372036854775807. Condition is always false. [compareValueOutOfTypeRangeError] Explanation: `offset` is an off64_t, a 64-bit signed long on this platform. It is compared with `(off64_t) INT64_MAX`, which is exactly that type's maximum. So `offset > INT64_MAX` can never be true, and the warning is correct. Main skipped 64-bit types entirely (`bits >= 63`). The PR now handles them, consistent with how the same pattern on `int` vs `INT_MAX` was already reported. The check is defensive portability code, so some users may see it as noise, but the diagnostic is accurate. ---- 22 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/libm/libmarpa/libmarpa_6.1.0~dfsg.orig.tar.gz Result: main Marpa-R2-2.086000~dfsg/libmarpa_dist/marpa_avl.c:427:9: style: Condition 'p!=NULL' is always true [knownConditionTrueFalse] Explanation: The same warning at the same location and with the same message shows up in both main and your. Only the error path or notes changed ('Calling function _marpa_avl_probe returns !0'). The diff pairs a main line with an identical your line, so the reported finding is unchanged. Whether it is a true or false positive, this PR does not alter what users see in any meaningful way. ---- 23 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libr/librepcb/librepcb_1.2.0+dfsg.orig.tar.xz Result: your librepcb-1.2.0+dfsg/libs/dxflib/src/dl_dxf.cpp:1327:54: style: Condition 'groupCode==105' is always false [knownConditionTrueFalse] librepcb-1.2.0+dfsg/libs/dxflib/src/dl_dxf.cpp:1307:18: note: Assuming that condition 'groupCode==105' is not redundant librepcb-1.2.0+dfsg/libs/dxflib/src/dl_dxf.cpp:1311:18: note: Assuming condition is false librepcb-1.2.0+dfsg/libs/dxflib/src/dl_dxf.cpp:1316:18: note: Assuming condition is false librepcb-1.2.0+dfsg/libs/dxflib/src/dl_dxf.cpp:1321:9: note: Assuming condition is false librepcb-1.2.0+dfsg/libs/dxflib/src/dl_dxf.cpp:1327:54: note: Condition 'groupCode==105' is always false Explanation: `handleXRecordData` returns early at line 1307 when `groupCode==105`. Between that check and line 1327, every path either returns or calls nothing that could modify the member `groupCode`. So `groupCode==105` inside the string-type condition at 1327 really is always false: it is dead, redundant code. The new warning is a true positive, so this is a new correct finding. ---- 24 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libs/libsepol/libsepol_3.11.orig.tar.gz Result: main libsepol-3.11/cil/src/cil_resolve_ast.c:1471:6: style: Condition 'ncurr' is always true [knownConditionTrueFalse] Explanation: Both main and your report the same warning at 1471:6, 'Condition ncurr is always true'. The diff only shows the 'your' version with notes attached, which points to a formatting or notes difference rather than a real change. The warning itself is correct: after the `if (!ncurr)` block returns, ncurr is non-null at line 1471. The message text is identical in both versions, so nothing changes for users. ---- 25 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libs/libsoldout/libsoldout_1.4.orig.tar.bz2 Result: main libsoldout-1.4/mkd2latex.c:295:6: style: Condition 'text' is always true [knownConditionTrueFalse] Explanation: The same warning (line 295, `if (text)` after `if (!text || !text->size) return 0;`) is reported by both versions. The warning is a true positive: `text` cannot be null at line 295. The 'your' line has the same text, with the error-path notes shown. The main/your difference is most likely just a change in the attached notes or error-path formatting. The same pattern appears for the other two files. There is no change in what is reported. ---- 26 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libv/libvisual-plugins/libvisual-plugins_0.4.2+dfsg.orig.tar.gz Result: your libvisual-plugins-0.4.2/plugins/actor/JESS/renderer.c:274:11: style: Condition 'aux2>255' is always false [knownConditionTrueFalse] libvisual-plugins-0.4.2/plugins/actor/JESS/renderer.c:272:10: note: Assignment 'aux2=(uint8_t)((float)j*0.245*aux)', assigned value is less than 256 libvisual-plugins-0.4.2/plugins/actor/JESS/renderer.c:274:11: note: Condition 'aux2>255' is always false Explanation: `aux2` is a `uint32_t` assigned from an explicit `(uint8_t)` cast, so its value is always in 0..255. The check `aux2>255` therefore can never be true. The PR adds impossible range bounds for integral casts, which is why Cppcheck now sees this. The new warning is a true positive: the clamp is dead code, likely left over from before the cast was added. ---- 27 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libv/libvpl/libvpl_2.17.0.orig.tar.xz Result: your libvpl-2.17.0/examples/api2x/hello-sharing-ocl/src/device-ocl.cpp:154:9: style: Condition '!device' is always false [knownConditionTrueFalse] libvpl-2.17.0/examples/api2x/hello-sharing-ocl/src/device-ocl.cpp:145:9: note: Assuming that condition '!handle' is not redundant libvpl-2.17.0/examples/api2x/hello-sharing-ocl/src/device-ocl.cpp:148:60: note: Assignment 'device=reinterpret_cast(handle)', assigned value is never 0 libvpl-2.17.0/examples/api2x/hello-sharing-ocl/src/device-ocl.cpp:154:9: note: Condition '!device' is always false Explanation: Both main and the PR report the same warning at 154:9. It is a true positive: `handle` is checked for null at line 145 and returns early, so `device = reinterpret_cast(handle)` can never be null, and `!device` is always false. Only the accompanying error-path notes differ. The new notes (assume `!handle` is not redundant, assigned value is never 0) are correct, but there is no evidence the old ones were wrong, so the change does not matter to users. ---- 28 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mfgtools/mfgtools_1.5.243.orig.tar.gz Result: main mfgtools-uuu_1.5.243/libuuu/bmap.cpp:146:6: style: Condition 'elem' is always true [knownConditionTrueFalse] Explanation: The same knownConditionTrueFalse warning at bmap.cpp:146 is reported by both main and the PR, so it is still present. 'elem' is checked with '!elem' at line 141, and that branch returns, so 'if (elem)' at line 146 is always true. This is a true positive. The diff appears only because the attached notes/error path differ between the two runs. The PR's notes ('Assuming that condition '!elem' is not redundant') are accurate, and the warning text is unchanged, so this does not matter to users. ---- 29 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ncurses/ncurses_6.6+20260608.orig.tar.gz Result: main ncurses-6.6-20260608/Ada95/gen/gen.c:250:11: warning: If resource allocation fails, then there is a possible null pointer dereference: fp [nullPointerOutOfResources] ncurses-6.6-20260608/Ada95/gen/gen.c:204:17: note: Assuming allocation function fails ncurses-6.6-20260608/Ada95/gen/gen.c:204:17: note: Assignment 'fp=fopen(argv[2],"wb")', assigned value is 0 ncurses-6.6-20260608/Ada95/gen/gen.c:202:12: note: Assuming condition is true ncurses-6.6-20260608/Ada95/gen/gen.c:250:11: note: Null pointer dereference Explanation: When argc == 3, line 204 assigns `fp = fopen(argv[2], "wb")`. The trace goes straight from that assignment to the fprintf calls, so nothing checks fp for NULL in between. If fopen fails, `fprintf(fp, ...)` at line 250 dereferences a null pointer, so the main warning was a true positive. The PR drops it, along with every other nullPointerOutOfResources warning in this file, which is a new false negative rather than a fixed false positive. ---- 30 / 50 ---- Verdict: NEUTRAL (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: Main and the PR report the same warning, so this is not a real removal. At line 165, `method` is always true because line 160 returns early when `!method`. That makes the warning a true positive in both versions. The PR version's notes point to the early-return check at line 160, which is an accurate explanation. Only the attached error path may have changed; the reported diagnostic is the same, so users see no meaningful difference. ---- 31 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/opensmtpd/opensmtpd_7.9.0p0.orig.tar.gz Result: main opensmtpd-7.9.0p0/openbsd-compat/libasr/getnameinfo.c:163:7: style: Condition 'host' is always true [knownConditionTrueFalse] Explanation: Both versions report the same true positive. In `host == NULL || hostlen == 0 || (host && ...)`, the third operand only runs when `host == NULL` was false, so `host` is always true at line 163. The PR only adds an error path: the notes point to the `host==NULL` check at line 162 as the reason. The warning stays correct and is now easier to understand, so this is a small improvement. ---- 32 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pdfmixtool/pdfmixtool_1.2.1.orig.tar.xz Result: your pdfmixtool-1.2.1/src/pdf_edit_lib/pdf_editor.cpp:726:27: style: Condition 'pi.rot%360==90' is always false [knownConditionTrueFalse] pdfmixtool-1.2.1/src/pdf_edit_lib/pdf_editor.cpp:717:22: note: Assuming that condition 'pi.rot%360==90' is not redundant pdfmixtool-1.2.1/src/pdf_edit_lib/pdf_editor.cpp:721:27: note: Assuming condition is false pdfmixtool-1.2.1/src/pdf_edit_lib/pdf_editor.cpp:726:27: note: Condition 'pi.rot%360==90' is always false Explanation: Line 726 repeats the condition from line 717, `pi.rot % 360 == 90`, inside the same if/else-if chain. Nothing changes `pi.rot` between them, so the third branch can only be reached when that condition is false. The warning that it is always false is therefore correct, and it exposes a real bug: the last branch was almost certainly meant to test 270. This is a new true positive. ---- 33 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/pplacer/pplacer_1.1~alpha19.orig.tar.gz Result: main pplacer-1.1.alpha19/cdd_src/cddcore.c:851:10: style: Condition 'M!=NULL' is always true [knownConditionTrueFalse] Explanation: Both versions report the same true positive: the inner `if (M!=NULL)` at line 851 is redundant because the outer `if (M!=NULL)` at line 848 already checked it. Only the error path differs. The new output adds a note at 849:19, 'Assuming condition is true', which points at `M->rowsize<=0`. That condition has nothing to do with why `M!=NULL` is always true, so the note is noise from merging unrelated value paths. The diagnosis is unchanged, but the explanation is slightly less accurate. Main's notes are not shown, so confidence is low. ---- 34 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/psftools/psftools_1.1.3.orig.tar.gz Result: your psftools-1.1.3/winfonts/peresd.c:85:6: style: Condition '!dir' is always false [knownConditionTrueFalse] psftools-1.1.3/winfonts/peresd.c:84:35: note: Calling function 'resdir32_get_parent' returns !0 psftools-1.1.3/winfonts/peresd.c:85:6: note: Condition '!dir' is always false Explanation: Both main and the PR report the same knownConditionTrueFalse warning for `!dir` at peresd.c:85, with the same text and location. Only the attached notes differ: the PR version carries a note that `resdir32_get_parent` returns !0, and main's notes are not shown. `resdir32_get_parent` returns `&self->m_parent->super`, and Cppcheck treats the address of a member as non-null in both versions. Whether that is a useful finding or a false positive (the code expects NULL for the root dir), it is unchanged by the PR. A different error path does not matter to users either way. ---- 35 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pypy3/pypy3_8.0.1+dfsg.orig.tar.xz Result: main pypy3.11-v8.0.1-src/pypy/module/pyexpat/src/expat/xmlparse.c:6591:11: style: Condition '!openEntity' is always false [knownConditionTrueFalse] Explanation: Line 6591 sits in the else branch of `if (! parser->m_openAttributeEntities)`. There `openEntity` is assigned `parser->m_openAttributeEntities`, so `!openEntity` really is always false and the warning is a true positive. The main line is removed only because the message text changed: the 'your' line reports the same warning at the same location, now with the note path shown. The diff shows the same pattern for line 7052 and for nanobind2.c, so this is a reformatting of an existing true positive, not a removal. ---- 36 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/racket/racket_8.18+dfsg1.orig.tar.xz Result: main racket-8.18+dfsg1/src/bc/src/validate.c:867:11: style: Condition 'tl_use_map' is always true [knownConditionTrueFalse] Explanation: Both main and the PR report the same warning at validate.c:867. Only the attached notes, i.e. the error path, appear to differ. The warning is a true positive. `tl_use_map` is already tested non-null at line 854. Between there and line 867 it is only read: it is cast and indexed, never reassigned. So the inner `if (tl_use_map)` is always true. The message text and verdict are unchanged, so this does not matter to users. ---- 37 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rdma-core/rdma-core_65.0.orig.tar.gz Result: main linux-rdma-rdma-core-58e4080/providers/ocrdma/ocrdma_verbs.c:2022:21: style: Condition 'cqes_to_poll==0' is always false [knownConditionTrueFalse] Explanation: Both main and the PR report the same knownConditionTrueFalse warning at ocrdma_verbs.c:2022. Only the attached notes differ: the PR's version shows the path through 'if (cqes_to_poll)'. The warning itself is unchanged, so this result has no effect on users. It is a false positive in both versions, because cqes_to_poll is decremented by err_cqes inside the loop and can reach 0 on a later iteration. The PR neither fixes nor introduces it. ---- 38 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/redict/redict_7.3.6+ds.orig.tar.xz Result: main redict/src/redict-cli.c:7994:17: style: Condition '!r' is always false [knownConditionTrueFalse] Explanation: Both main and the PR report the same knownConditionTrueFalse warning for '!r' at line 7994, with the same text. The main line is paired with an identical 'your' line, so the only difference is probably the attached notes or their ordering. Whether reconnectingRedictCommand can really return NULL does not change between the two versions. The PR neither removes nor adds this finding, so it makes no difference to users. ---- 39 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/relion/relion_5.1.1+ds.orig.tar.xz Result: your 3dem-relion-e47503a/src/apps/vis_delocalisation.cpp:106:33: style: Argument '0*s' to function pasteImage is always 0. Constant literal calculation disable/hide variable expression 's'. [knownArgumentHiddenVariableExpression] Explanation: Line 106 passes `0*s` to `pasteImage`; `s` is a runtime `const int` (either `s_cl` or `obsModel.getBoxSize(optGroup)`). The argument is therefore always 0, and the variable `s` is hidden by multiplying it by a literal 0. That is exactly the pattern knownArgumentHiddenVariableExpression is meant to report (a variable expression multiplied by 0), so the new warning is factually correct and matches the check's design. The author most likely wrote it on purpose for symmetry with `1*s` and `(b+2)*s`, so users may see it as noise. It is still a true positive by the checker's own rules, now found because the PR's type and value changes let the check fire. Confidence is low because the diff does not show why main missed it. ---- 40 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/reprepro/reprepro_5.5.1.orig.tar.xz Result: main reprepro-5.5.1/log.c:1056:22: style: Condition 'logger->logfile!=NULL' is always true [knownConditionTrueFalse] Explanation: The same warning (log.c:1056, 'logger->logfile!=NULL' is always true) is reported by both main and your. Only the extra note lines differ in the diff output, so the diff pairs them as a removed and an added line. The warning itself is a true positive: line 1053 returns early when logfile is NULL, so the check on line 1056 is redundant. Nothing changes for users. ---- 41 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/rust-capstone-sys/rust-capstone-sys_0.17.0.orig.tar.gz Result: your capstone-sys-0.17.0/capstone/tests/test_ppc.c:129:33: error: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_QPX'. [integerOverflow] Explanation: In capstone's cs_mode enum, CS_MODE_BIG_ENDIAN is defined as 1U << 31 (0x80000000) and CS_MODE_QPX as 1 << 4. Because the enum has a value that does not fit in int, compilers give it an unsigned underlying type. Adding these two constants (0x80000010) is therefore well-defined: it is not signed overflow, and nothing wraps either. The PR's new common-integral-type logic apparently treats these enum operands as signed int, so it reports a spurious 'Signed integer overflow' error. This is a new false positive at error severity. ---- 42 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/simgrid/simgrid_4.1.orig.tar.xz Result: main simgrid-4.1/teshsuite/smpi/mpich3-test/coll/opband.c:166:31: style: Comparing expression of type 'char' against value 240. Condition is always true. [compareValueOutOfTypeRangeError] Explanation: The line compares `coutbuf[2] != (char) 0xf0`. Both sides are `char`, because the constant is cast to `char` first. That gives (char)0xf0, which is -16 when char is signed and 240 when unsigned, and the converted `coutbuf[2]` can hold either value. So the condition is not always true, and main's claim that a 'char' is compared against 240 is a false positive. The PR truncates the cast value to the target type and reworks the range check, which removes the false warning. ---- 43 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/swarp/swarp_2.41.5.orig.tar.gz Result: main swarp-2.41.5/src/wcs/proj.c:429:16: style: Condition 'prj->inv_x' is always true [knownConditionTrueFalse] Explanation: On line 429 the check `prj->inv_x ? ... : ...` sits inside `if ((prj->inv_x) && (prj->inv_y))`, so `prj->inv_x` is always true there. The warning is a true positive. Main and the PR both report it on the same line with the same text. The only difference is that the PR's version carries extra note lines ('Assuming that condition ... is not redundant'). The main-only line and the your-only line are therefore the same warning, and nothing changes for users. ---- 44 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/t/thc-ipv6/thc-ipv6_3.8.orig.tar.gz Result: your thc-ipv6-3.8/thc-ipv6-lib.c:367:14: style: Condition 'data!=NULL' is always true [knownConditionTrueFalse] thc-ipv6-3.8/thc-ipv6-lib.c:347:12: note: Assuming that condition 'data==NULL' is not redundant thc-ipv6-3.8/thc-ipv6-lib.c:350:19: note: Assuming condition is true thc-ipv6-3.8/thc-ipv6-lib.c:367:14: note: Condition 'data!=NULL' is always true Explanation: The warning itself is a true positive. At line 347, `data == NULL` returns early, so `data != NULL` at line 367 is always true. The only change is in the error path. The new output adds the note "350:19: Assuming condition is true", which points at `length + 40 > 65535`. That condition has nothing to do with `data` being non-null, so the note is irrelevant and makes the explanation less accurate. Main's own notes are not shown, so the exact difference cannot be confirmed. ---- 45 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/u/uaputl/uaputl_1.12.orig.tar.gz Result: main uaputl/uaputl.c:1358:21: style: Condition 'tlv' is always true [knownConditionTrueFalse] Explanation: The removed 'main' line is replaced by an identical 'your' warning at the same location. Only the attached notes differ: the new version explains that the assigned value '&response_buf->StaList[i]' is never 0. 'tlv' is the address of an array element, so it is never null, and the warning is a true positive in both versions. Users see the same diagnostic, so the change is essentially neutral, perhaps with a slightly better error path. ---- 46 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/util-linux/util-linux_2.42.4.orig.tar.xz Result: main util-linux-2.42.4/sys-utils/unshare.c:538:22: style: Condition 'inner+1!=0' is always true [knownConditionTrueFalse] Explanation: `inner` is an `unsigned int` parameter, and -1 is used to mean "no map". `inner + 1` wraps to 0 when inner is UINT_MAX, so `inner + 1 != 0` can be false. Main wrongly assumed that unsigned `+1` never wraps and reported the condition as always true. The PR now treats unsigned arithmetic that may wrap correctly, so this false positive is gone. The other `inner+1` warnings in this function were removed for the same reason. ---- 47 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/v/valentina/valentina_1.1.1+dfsg.orig.tar.xz Result: main valentina-v1.1.1-c8dbf529ec0c7fc114fe395e0b04696efb90b9fb/src/libs/vobj/delaunay.cpp:937:16: style: Condition 'n==3' is always true [knownConditionTrueFalse] valentina-v1.1.1-c8dbf529ec0c7fc114fe395e0b04696efb90b9fb/src/libs/vobj/delaunay.cpp:1038:20: note: Assuming that condition 'num_points>=3' is not redundant valentina-v1.1.1-c8dbf529ec0c7fc114fe395e0b04696efb90b9fb/src/libs/vobj/delaunay.cpp:1043:57: note: Calling function 'del_divide_and_conquer', 3rd argument 'static_cast(num_points-1)' value is 2 valentina-v1.1.1-c8dbf529ec0c7fc114fe395e0b04696efb90b9fb/src/libs/vobj/delaunay.cpp:1043:38: note: Calling function 'del_divide_and_conquer', 2nd argument '0' value is 0 valentina-v1.1.1-c8dbf529ec0c7fc114fe395e0b04696efb90b9fb/src/libs/vobj/delaunay.cpp:926:32: note: Assignment 'n=end-start+1', assigned value is greater than 2 valentina-v1.1.1-c8dbf529ec0c7fc114fe395e0b04696efb90b9fb/src/libs/vobj/delaunay.cpp:928:11: note: Assuming that condition 'n>3' is not redundant valentina-v1.1.1-c8dbf529ec0c7fc114fe395e0b04696efb90b9fb/src/libs/vobj/delaunay.cpp:937:16: note: Condition 'n==3' is always true Explanation: `del_divide_and_conquer` is recursive. Its external call at line 1043 passes `n >= 3`. The recursive calls split the range, though: for n=5, i=3, so the right half gets n=2. That means `n` can be 2 in the else branch, and `n == 3` is not always true there. The old warning built an impossible `<=2` bound from that one call site and ignored the recursion, so it was a false positive. Removing it is an improvement. ---- 48 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/v/virglrenderer/virglrenderer_1.3.0.orig.tar.bz2 Result: your virglrenderer-1.3.0/src/vrend/vrend_shader.c:3323:34: style: Condition 'inst->Texture.NumOffsets' is always true [knownConditionTrueFalse] virglrenderer-1.3.0/src/vrend/vrend_shader.c:3316:39: note: Assuming that condition 'inst->Texture.NumOffsets==0' is not redundant virglrenderer-1.3.0/src/vrend/vrend_shader.c:3323:34: note: Condition 'inst->Texture.NumOffsets' is always true Explanation: The warning is a true positive both before and after the PR. In the else-branch of 'if (inst->Texture.NumOffsets == 0)', 'inst->Texture.NumOffsets' is necessarily nonzero, so the condition at line 3323 is always true. The only change is that the message now carries notes explaining why: it points at the 'NumOffsets==0' check at line 3316. The warning is the same, but the added explanation makes it more useful to users. ---- 49 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/w/wise/wise_2.4.1.orig.tar.gz Result: your estfrag3.c:1409:12: style: Condition 'out==NULL' is always false [knownConditionTrueFalse] estfrag3.c:1406:13: note: Assuming that condition 'out==NULL' is not redundant estfrag3.c:1409:12: note: Condition 'out==NULL' is always false Explanation: The warning appears in both main and your with identical text and location. The listed line numbers seem shifted by two. The real check is `if(out == NULL)` right after `out->basematrix = ...`, which follows an earlier `if (out == NULL) return NULL;`. So `out` cannot be NULL there and the condition is always false. This is a true positive: the code meant to test `out->basematrix`. The PR only changed the attached error-path notes, and the new notes correctly point to the earlier NULL check. The same pattern appears across many generated files in this package. Users see the same correct warning either way. ---- 50 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/z/zpaq/zpaq_7.15+repack.orig.tar.xz Result: main libzpaq.h:923:9: style: Condition 'nb<=128' is always false [knownConditionTrueFalse] libzpaq.h:920:9: note: Assuming that condition 'sz==0' is not redundant libzpaq.h:921:5: note: Assignment 'n=sz', assigned value is greater than 0 libzpaq.h:922:22: note: Assignment 'nb=128+n*sizeof(U8)', assigned value is greater than 128 libzpaq.h:923:9: note: Condition 'nb<=128' is always false Explanation: The code `nb=128+n*sizeof(T)` is size_t arithmetic and can wrap on overflow. The `nb<=128` check exists precisely to detect that wraparound, so it is not always false. Main assumed unsigned addition does not wrap and derived nb>128, which produced a false positive. The PR adds wrap-awareness for unsigned arithmetic results (isUnsignedArithmeticNoWrap), so the false positive is gone.