AI review of 2026-11-06_17-20-15-64ce2cb0c93e-results.txt PR: #8967 https://github.com/cppcheck-opensource/cppcheck/pull/8967 Tested: 64ce2cb0c93e7bff4309d0d0eeeec12392782fa1 Merge base: 8df3087f48aa70a2e0e54ec05324f7147ec3e0b6 Reviewed: 2026-11-07 11:29:22 UTC Model: claude-opus-5-5 (effort high) Results: 4 reviewed of 17 in the report, 13 not reviewed: valueFlowMaxIterations Verdicts: 4 improvement Tokens: 8859 input, 3069 cache read, 9207 cache write, 1792 output The verdicts are written by AI and can be wrong. ---- 1 / 4 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mame/mame_0.289+dfsg1.orig.tar.xz Result: your mame-mame0289/src/devices/cpu/m68000/m68000.h:564:6: style: Condition '!r' is always false [knownConditionTrueFalse] Explanation: At line 562, `r = (a << 17) | (m_alue << 1) | 1`. Because the expression ORs in 1, r can never be 0, so `!r` is always false. The new warning is a true positive. The code is redundant: this is a template-like copy of alu_sla0, where the check is meaningful. Cppcheck now correctly knows that a bitwise OR with a nonzero operand is never zero. ---- 2 / 4 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/o/openboard/openboard_1.7.7+dfsg.orig.tar.xz Result: your OpenBoard-1.7.7/src/board/UBBoardController.cpp:485:9: style: Condition 'verbose' is always true [knownConditionTrueFalse] OpenBoard-1.7.7/src/board/UBBoardController.cpp:484:24: note: Assignment 'verbose=fls|sf_showProgress', assigned value is never 0 OpenBoard-1.7.7/src/board/UBBoardController.cpp:485:9: note: Condition 'verbose' is always true Explanation: `bool verbose = fls | sf_showProgress;` ORs in the non-zero flag `sf_showProgress`, so the result can never be 0 and `verbose` is always true. This is a real bug: the author almost certainly meant `fls & sf_showProgress`. The new warning is a true positive, made possible by the PR's new impossible-0 value for `|` expressions. ---- 3 / 4 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/o/openboard/openboard_1.7.7+dfsg.orig.tar.xz Result: your OpenBoard-1.7.7/src/board/UBBoardController.cpp:491:9: style: Condition 'verbose' is always true [knownConditionTrueFalse] OpenBoard-1.7.7/src/board/UBBoardController.cpp:484:24: note: Assignment 'verbose=fls|sf_showProgress', assigned value is never 0 OpenBoard-1.7.7/src/board/UBBoardController.cpp:491:9: note: Condition 'verbose' is always true Explanation: `bool verbose = fls | sf_showProgress;` ORs in a non-zero flag constant, so the result can never be 0 and `verbose` is always true. The author almost certainly meant `fls & sf_showProgress`. `verbose` is not changed between line 484 and line 491, so the condition at 491 is also always true. The new warning is a true positive that points at a real bug. ---- 4 / 4 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/psychtoolbox-3/psychtoolbox-3_3.0.22.3+dfsg.orig.tar.xz Result: your Psychtoolbox-3-Psychtoolbox-3-0956db7/PsychSourceGL/Source/Linux/Screen/PsychScreenGlue.c:4178:20: style: Condition 'v&(EVERGREEN_CRTC_MASTER_EN|(0x1<<16))==0' is always false [knownConditionTrueFalse] Explanation: Because `==` binds tighter than `&`, the code is parsed as `v & ((EVERGREEN_CRTC_MASTER_EN | (0x1<<16)) == 0)`. The OR of the mask constants is non-zero (it includes 0x10000), so the inner comparison is always 0 and `v & 0` is always false. The new valueflow rule (an OR with a non-zero operand cannot be 0) lets Cppcheck see this. The warning is a true positive that exposes a real operator-precedence bug: the intended check was `(v & mask) == 0`, so disabled CRTCs are never detected by this part of the condition.