{ "tokens": { "input": 8859, "cache_read": 3069, "cache_write": 9207, "output": 1792 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/m/mame/mame_0.289+dfsg1.orig.tar.xz", "your mame-mame0289/src/devices/cpu/m68000/m68000.h:564:6: style: Condition '!r' is always false [knownConditionTrueFalse]" ], "verdict": { "verdict": "improvement", "confidence": "high", "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." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/o/openboard/openboard_1.7.7+dfsg.orig.tar.xz", "your OpenBoard-1.7.7/src/board/UBBoardController.cpp:485:9: style: Condition 'verbose' is always true [knownConditionTrueFalse]\n OpenBoard-1.7.7/src/board/UBBoardController.cpp:484:24: note: Assignment 'verbose=fls|sf_showProgress', assigned value is never 0\n OpenBoard-1.7.7/src/board/UBBoardController.cpp:485:9: note: Condition 'verbose' is always true" ], "verdict": { "verdict": "improvement", "confidence": "high", "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." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/o/openboard/openboard_1.7.7+dfsg.orig.tar.xz", "your OpenBoard-1.7.7/src/board/UBBoardController.cpp:491:9: style: Condition 'verbose' is always true [knownConditionTrueFalse]\n OpenBoard-1.7.7/src/board/UBBoardController.cpp:484:24: note: Assignment 'verbose=fls|sf_showProgress', assigned value is never 0\n OpenBoard-1.7.7/src/board/UBBoardController.cpp:491:9: note: Condition 'verbose' is always true" ], "verdict": { "verdict": "improvement", "confidence": "high", "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." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/p/psychtoolbox-3/psychtoolbox-3_3.0.22.3+dfsg.orig.tar.xz", "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]" ], "verdict": { "verdict": "improvement", "confidence": "high", "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." } } ], "started": "2026-11-07 00:45:01 UTC", "runner": "pc" }