AI review of 2026-10-28_10-35-33-e04ce1dd92d1-results.txt PR: #8974 https://github.com/cppcheck-opensource/cppcheck/pull/8974 Tested: e04ce1dd92d1c80d2d4601d906d6aab25d339211 Merge base: ffe7e9be207e201c7b8d6ed5272b931889879a14 Reviewed: 2026-10-28 16:01:43 UTC Model: claude-opus-5-5 (effort high) Results: 1 reviewed of 1 in the report Verdicts: 1 improvement Tokens: 2501 input, 0 cache read, 1563 cache write, 473 output The verdicts are written by AI and can be wrong. ---- 1 / 1 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/megaglest/megaglest_3.13.0.orig.tar.xz Result: your megaglest-3.13.0/source/glest_game/ai/path_finder.cpp:213:40: style: Argument 'frameIndex<0' to function setTargetPos is always 1. It does not matter what value 'frameIndex' has. [knownArgument] megaglest-3.13.0/source/glest_game/ai/path_finder.cpp:205:19: note: Assuming that condition 'frameIndex<0' is not redundant megaglest-3.13.0/source/glest_game/ai/path_finder.cpp:206:89: note: Assuming condition is false megaglest-3.13.0/source/glest_game/ai/path_finder.cpp:213:40: note: Argument 'frameIndex<0' to function setTargetPos is always 1. It does not matter what value 'frameIndex' has. Explanation: Line 213 sits inside `if(frameIndex < 0)` (line 205), and `frameIndex` is not changed between the check and the call. So the argument `frameIndex < 0` passed to `setTargetPos` is always true and could simply be `true`. Before this PR, the check skipped `frameIndex` because its value list was not empty (it held impossible values). The PR now handles that case, matching its intent (#15145). The new warning is a correct, if purely stylistic, true positive.