AI review of 2026-10-12_09-06-58-ff2b85541643-results.txt PR: #8880 https://github.com/cppcheck-opensource/cppcheck/pull/8880 Tested: ff2b8554164337a179b9481bc78e771ab40401df Merge base: a3361b3aa7b777978ae97c91256bffc431447af5 Reviewed: 2026-10-14 18:51:56 UTC Model: claude-opus-5-5 (effort high) Results: 46 reviewed of 51 in the report, 5 not reviewed: valueFlowMaxIterations Verdicts: 23 improvement, 17 regression, 6 unclear Tokens: 143590 input, 197025 cache read, 47925 cache write, 27000 output The verdicts are written by AI and can be wrong. ---- 1 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-djgpp/binutils-djgpp_2.35.1+dfsg.orig.tar.xz Result: your gnu/binutils-2.35.1/bfd/vms-alpha.c:5982:15: style: Condition 'nextname>=maxname' is always false [knownConditionTrueFalse] gnu/binutils-2.35.1/bfd/vms-alpha.c:5969:15: note: Assuming that condition 'nextname>=maxname' is not redundant gnu/binutils-2.35.1/bfd/vms-alpha.c:5975:9: note: Assignment 'name=nextname', assigned value is less than symbolic=maxname gnu/binutils-2.35.1/bfd/vms-alpha.c:5976:11: note: Assuming condition is false gnu/binutils-2.35.1/bfd/vms-alpha.c:5968:11: note: nextname is assigned 'name+name[0]+1' here. gnu/binutils-2.35.1/bfd/vms-alpha.c:5975:7: note: name is assigned 'nextname' here. gnu/binutils-2.35.1/bfd/vms-alpha.c:5981:28: note: Assignment 'nextname=name+name[0]+1', assigned value is less than symbolic=maxname gnu/binutils-2.35.1/bfd/vms-alpha.c:5982:15: note: Condition 'nextname>=maxname' is always false Explanation: The note line numbers are offset by about 13, so the warning is about the second check, `nextname >= maxname` (shown at line 5994). Before that check, `name = nextname` and then `nextname = name + name[0] + 1`. Here `name[0]` is a length byte read from the file, so the new `nextname` can easily be at or beyond `maxname`. The check is a real bounds check for corrupted input. Cppcheck wrongly carries the earlier fact `nextname < maxname`, which came from the textually identical expression `name+name[0]+1`, across the reassignment of `name`. The companion redundantAssignment warning shows the same confusion. This is a new false positive from the symbolic +/- propagation added by the PR. ---- 2 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-djgpp/binutils-djgpp_2.35.1+dfsg.orig.tar.xz Result: your gnu/binutils-2.35.1/bfd/vms-alpha.c:5988:2: style: Variable 'name' is assigned an expression that holds the same value. [redundantAssignment] gnu/binutils-2.35.1/bfd/vms-alpha.c:5968:11: note: nextname is assigned 'name+name[0]+1' here. gnu/binutils-2.35.1/bfd/vms-alpha.c:5969:15: note: Assuming condition is false gnu/binutils-2.35.1/bfd/vms-alpha.c:5975:9: note: Assignment 'name=nextname', assigned value is symbolic=name+name[0]+1 gnu/binutils-2.35.1/bfd/vms-alpha.c:5976:11: note: Assuming condition is false gnu/binutils-2.35.1/bfd/vms-alpha.c:5968:11: note: nextname is assigned 'name+name[0]+1' here. gnu/binutils-2.35.1/bfd/vms-alpha.c:5969:15: note: Assuming condition is false gnu/binutils-2.35.1/bfd/vms-alpha.c:5975:7: note: name is assigned 'nextname' here. gnu/binutils-2.35.1/bfd/vms-alpha.c:5976:11: note: Assuming condition is false gnu/binutils-2.35.1/bfd/vms-alpha.c:5981:28: note: Assignment 'nextname=name+name[0]+1', assigned value is symbolic=name+name[0]+1 gnu/binutils-2.35.1/bfd/vms-alpha.c:5988:2: note: Variable 'name' is assigned an expression that holds the same value. Explanation: The reported line numbers are offset by 12 from the source shown. The warning is really on `name = nextname;` (source line 6000). Just before that, `nextname = name + name[0] + 1;` (line 5993) uses the *new* `name`, which is the old `nextname`. So `nextname` advances past the version string and differs from the current `name`. Cppcheck treats the symbolic expression `name+name[0]+1` as the same value across both assignments, even though `name` changed in between. The new symbolic +/- propagation thus produces a false redundantAssignment. ---- 3 / 46 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dvbstreamer/dvbstreamer_2.1.0.orig.tar.gz Result: main dvbstreamer-2.1.0/src/dvbctrl.c:485:15: style: Variable 'start' can be declared as pointer to const [constVariablePointer] Explanation: `start` is only assigned (`line + sizeof(...)`, `separator + 1`) and read via `strdup(start)` and `atoi(start)`. Both functions take `const char*`. Nothing is written through `start`, so it could be declared `const char *start`, and the warning was a true positive. The PR's new symbolic values (e.g. `separator + 1` now gets a symbolic value tied to `start`) likely make Cppcheck think `start` may be modified through an alias. That suppresses a valid style warning. ---- 4 / 46 ---- Verdict: IMPROVEMENT (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/display_init.c:594:6: style: Variable 'rad1' is assigned an expression that holds the same value. [redundantAssignment] excellent-bifurcation-0.0.20071015/src/display_init.c:587:11: note: rad1 is assigned '20+j' here. excellent-bifurcation-0.0.20071015/src/display_init.c:594:6: note: Variable 'rad1' is assigned an expression that holds the same value. Explanation: Line 587 sets `rad1 = 20 + j`. Between that line and line 594, neither `j` nor `rad1` is modified. `draw_ring` receives `rad1` by value, and `j` is the loop counter, which only changes at the end of the iteration. So the assignment `rad1 = 20 + j` at line 594 really does store the value `rad1` already holds. The warning is factually correct. The new symbolic +/- propagation lets Cppcheck see this equivalence, so this is a new true positive (style). The author probably repeated the line on purpose to keep the blocks symmetric, which makes it less useful in practice, but it is not wrong. ---- 5 / 46 ---- Verdict: IMPROVEMENT (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/display_init.c:601:6: style: Variable 'rad1' is assigned an expression that holds the same value. [redundantAssignment] excellent-bifurcation-0.0.20071015/src/display_init.c:594:11: note: rad1 is assigned '20+j' here. excellent-bifurcation-0.0.20071015/src/display_init.c:601:6: note: Variable 'rad1' is assigned an expression that holds the same value. Explanation: Line 594 sets `rad1 = 20 + j`. Between 594 and 601, neither `rad1` nor `j` changes: `draw_ring` gets `rad1` by value, and only `rad2` and `fuzzy` are written. So line 601 assigns `rad1` the value it already has, and the warning is factually correct. The PR's new symbolic arithmetic lets ValueFlow tell that `20+j` equals `rad1+0`. This is a newly found true positive. The code is written in a deliberately repetitive style, so users may see it as low-value, but the redundancy is real. ---- 6 / 46 ---- Verdict: IMPROVEMENT (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/display_init.c:705:6: style: Variable 'rad1' is assigned an expression that holds the same value. [redundantAssignment] excellent-bifurcation-0.0.20071015/src/display_init.c:698:11: note: rad1 is assigned '50+j' here. excellent-bifurcation-0.0.20071015/src/display_init.c:705:6: note: Variable 'rad1' is assigned an expression that holds the same value. Explanation: Line 698 assigns `rad1 = 50 + j`. Between lines 698 and 705, neither `rad1` nor `j` is modified: `rad1` is only read and passed by value to `draw_ring`, and `j` is the loop counter. So assigning `rad1 = 50 + j` again at line 705 stores exactly the value `rad1` already holds, which makes it genuinely redundant. The PR's new symbolic +/- constant propagation lets Cppcheck see this. The copy-paste style is deliberate, but the warning is accurate, so this is a new true positive. ---- 7 / 46 ---- Verdict: IMPROVEMENT (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/display_init.c:712:6: style: Variable 'rad1' is assigned an expression that holds the same value. [redundantAssignment] excellent-bifurcation-0.0.20071015/src/display_init.c:705:11: note: rad1 is assigned '50+j' here. excellent-bifurcation-0.0.20071015/src/display_init.c:712:6: note: Variable 'rad1' is assigned an expression that holds the same value. Explanation: Line 705 sets `rad1 = 50 + j`. Between 705 and 712, only `rad2` and `fuzzy` change, and `draw_ring` receives `rad1` by value. `j` does not change either. So line 712 reassigns the identical value `50 + j`, and the assignment really is redundant. The new symbolic +/- values let Cppcheck see this. The code was written repetitively for symmetry, so some users may find the style warning noisy. It is still factually correct, assuming `rad1` is a plain local int, which seems likely. ---- 8 / 46 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gimp/gimp_3.2.6.orig.tar.xz Result: your gimp-3.2.6/app/core/gimplineart.c:1841:19: style: Variable 'p2y' is assigned an expression that holds the same value. [redundantAssignment] gimp-3.2.6/app/core/gimplineart.c:1826:23: note: p2y is assigned 'p->y+1' here. gimp-3.2.6/app/core/gimplineart.c:1841:19: note: Variable 'p2y' is assigned an expression that holds the same value. Explanation: Line 1826 sets `p2y = p->y + 1`. The following `if` block never changes `p2y` or `p->y`: it only allocates a new Pixel, pushes it onto the queue and writes into `visited`. So at line 1841 `p2y` already equals `p->y + 1`, and the second assignment really is redundant. The PR's new symbolic arithmetic (`p->y` known as `p2y - 1`, plus 1 gives `p2y`) lets Cppcheck see this. The code is written this way on purpose for symmetry, so the fix is cosmetic, but the warning is factually correct and not a false positive. ---- 9 / 46 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gimp/gimp_3.2.6.orig.tar.xz Result: your gimp-3.2.6/app/core/gimplineart.c:1870:19: style: Variable 'p2x' is assigned an expression that holds the same value. [redundantAssignment] gimp-3.2.6/app/core/gimplineart.c:1855:23: note: p2x is assigned 'p->x-1' here. gimp-3.2.6/app/core/gimplineart.c:1870:19: note: Variable 'p2x' is assigned an expression that holds the same value. Explanation: Line 1855 sets `p2x = p->x - 1`. Between 1855 and 1870, `p2x` is only read (bounds checks, array indexing, `p2->x = p2x`), and `p->x` is never modified. So the identical assignment `p2x = p->x - 1` at line 1870 really is redundant. The PR's new symbolic tracking for `+`/`-` lets Cppcheck see this. The warning is a true positive, though the code repeats the line on purpose for symmetry across the eight neighbour checks, so some users may see it as low-value noise. ---- 10 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/iem-plugin-suite/iem-plugin-suite_1.16.0.orig.tar.gz Result: your IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1187:29: style: Variable 's2' is assigned an expression that holds the same value. [redundantAssignment] IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1165:28: note: s1 is assigned 's+1' here. IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1181:34: note: Assuming condition is true IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1187:29: note: Variable 's2' is assigned an expression that holds the same value. Explanation: The code swaps s1 and s2 with a temporary: tmp = s2; s2 = s1; s1 = tmp. Here s1 = s+1 and s2 = s+2, so `s2 = s1` changes s2 from s+2 to s+1. It is not a redundant assignment. The new symbolic +/- propagation from the PR apparently gives s2 and s1 symbolic values that are wrongly treated as equal (s1 = s+1 symbolic vs the assigned expression). The redundantAssignment warning is a false positive caused by the PR. ---- 11 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/iem-plugin-suite/iem-plugin-suite_1.16.0.orig.tar.gz Result: your IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1188:29: style: Variable 's1' is assigned an expression that holds the same value. [redundantAssignment] IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1165:40: note: s2 is assigned 's+2' here. IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1181:34: note: Assuming condition is true IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1186:35: note: Assignment 'tmp=s2', assigned value is symbolic=s+2 IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1188:29: note: Variable 's1' is assigned an expression that holds the same value. Explanation: This is a standard swap. Line 1186 sets tmp = s2, which is s+2. Line 1187 sets s2 = s1, so s2 becomes s+1. Line 1188 sets s1 = tmp, so s1 changes from s+1 to s+2. The assignment changes s1's value, so it is not redundant. The new symbolic +/- propagation in the PR produces wrong symbolic values here (stale or mixed symbolic info about s1/s2/tmp), which leads to a false positive redundantAssignment. ---- 12 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/iem-plugin-suite/iem-plugin-suite_1.16.0.orig.tar.gz Result: your IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1200:33: style: Variable 's3' is assigned an expression that holds the same value. [redundantAssignment] IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1165:28: note: s1 is assigned 's+1' here. IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1181:34: note: Assuming condition is false IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1194:38: note: Assuming condition is true IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1200:33: note: Variable 's3' is assigned an expression that holds the same value. Explanation: `s1 = s + 1` and `s3 = s + 3`, and `s3` is not changed before line 1200. So `s3 = s1;` changes `s3` from s+3 to s+1, as part of a swap. The assignment is not redundant. The new symbolic +/- offsets from the PR make Cppcheck wrongly treat `s1` and `s3` as equal, so this new warning is a false positive. ---- 13 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/iem-plugin-suite/iem-plugin-suite_1.16.0.orig.tar.gz Result: your IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1201:33: style: Variable 's1' is assigned an expression that holds the same value. [redundantAssignment] IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1165:52: note: s3 is assigned 's+3' here. IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1194:38: note: Assuming condition is true IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1199:39: note: Assignment 'tmp=s3', assigned value is symbolic=s+3 IEMPluginSuite-v1.16.0-d9e0a9aac011ab1a1edfea1d5920918f159a5851/resources/NewtonApple/NewtonApple_hull3D.cpp:1201:33: note: Variable 's1' is assigned an expression that holds the same value. Explanation: This is a swap of s1 and s3 through tmp. At line 1201, tmp holds s+3 and s1 holds s+1, so `s1 = tmp` changes s1 and is not redundant. The new symbolic +/- propagation leads Cppcheck to treat s1 and s3 (s+1 and s+3) as the same value, probably because symbolic values with offsets on the shared base 's' are mixed up in the redundantAssignment check. The warning is a false positive added by the PR. ---- 14 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/j/john/john_1.9.0.orig.tar.xz Result: your john-1.9.0/src/DES_bs_b.c:589:5: style: Variable 'src1' is assigned an expression that holds the same value. [redundantAssignment] john-1.9.0/src/DES_bs_b.c:587:13: note: src2 is assigned 'dst+24' here. john-1.9.0/src/DES_bs_b.c:588:12: note: Assuming condition is true john-1.9.0/src/DES_bs_b.c:589:5: note: Variable 'src1' is assigned an expression that holds the same value. Explanation: This new warning is a false positive. `src1` is initialized to `dst` and `src2` to `dst + 24`, so `src1 = src2` changes `src1` by 24; the assignment is the deliberate swap with `src2 = dst`. The PR's new symbolic `+`/`-` propagation now gives `dst + 24` a symbolic value derived from another variable. The redundantAssignment check appears to treat that wrongly as the same value, ignoring the offset. ---- 15 / 46 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/k/kbuild/kbuild_0.1.9998svn3686+dfsg.orig.tar.gz Result: your kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:121:17: style: Variable 'src' is assigned an expression that holds the same value. [redundantAssignment] kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:114:21: note: src is assigned 'input+2' here. kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:117:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:119:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:121:17: note: Variable 'src' is assigned an expression that holds the same value. Explanation: At line 114 `src = input + 2`, then `mbsrtowcs(NULL, &src, ...)` may change it. Line 118 then runs `ASSERT(src == input + 2)`. The gnulib ASSERT macro aborts when the condition is false, so after line 118 `src` is known to equal `input + 2`. Reassigning it at line 121 therefore really does not change its value. The PR's new symbolic +/- offset tracking lets Cppcheck see this. The warning is technically correct, so it is a new true positive. It is low value, though: the reassignment is deliberate defensive style in test code, so some users may see it as noise. ---- 16 / 46 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kbuild/kbuild_0.1.9998svn3686+dfsg.orig.tar.gz Result: your kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:166:17: style: Variable 'src' is assigned an expression that holds the same value. [redundantAssignment] kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:159:21: note: src is assigned 'input+2' here. kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:162:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:164:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:166:17: note: Variable 'src' is assigned an expression that holds the same value. Explanation: Line 161 passes `&src` to `mbsrtowcs()`, which may change `src`. The reset at line 166 deliberately restores the input pointer before the second call. The new symbolic `+`/`-` values make Cppcheck treat `src` as still equal to `input + 2` from line 159, ignoring the modification through `&src`. The two values only coincide because the test's ASSERT at line 163 aborts otherwise, and the trace never cites that line. Warning about an intentional reset in test code is noise from imprecise reasoning, so this new style warning is effectively a false positive. ---- 17 / 46 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kbuild/kbuild_0.1.9998svn3686+dfsg.orig.tar.gz Result: your kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:220:17: style: Variable 'src' is assigned an expression that holds the same value. [redundantAssignment] kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:213:21: note: src is assigned 'input+4' here. kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:216:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:218:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:220:17: note: Variable 'src' is assigned an expression that holds the same value. Explanation: At line 213, `src = input + 4`, and then `&src` is passed to `mbsrtowcs()`, which may change `src` through the pointer. Line 220 deliberately resets `src` before the second call. The new symbolic '+' values let Cppcheck treat `src` as still equal to `input+4`. The trace skips the `src == input + 4` assert at line 217, so the warning seems to ignore the possible change through `&src` rather than rely on that assert. Even though the assert happens to make the values equal, this defensive re-initialisation in test code is intentional and not a real redundancy. The new style warning is noise, and the same pattern appears in four places. ---- 18 / 46 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kbuild/kbuild_0.1.9998svn3686+dfsg.orig.tar.gz Result: your kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:265:17: style: Variable 'src' is assigned an expression that holds the same value. [redundantAssignment] kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:258:21: note: src is assigned 'input+2' here. kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:261:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:263:17: note: Assuming condition is false kbuild-3686/src/grep/gnulib-tests/test-mbsrtowcs.c:265:17: note: Variable 'src' is assigned an expression that holds the same value. Explanation: At line 260, `&src` is passed to `mbsrtowcs`, which is allowed to modify `src`. The test then deliberately resets `src = input + 2` at line 265 before the second call. The diagnostic trace only cites the ASSERTs at 261 and 263 as 'Assuming condition is false'. It does not cite the `src == input + 2` assert at 262. So Cppcheck seems to assume `src` keeps its old value across a call that takes its address. Even if the line-262 assert happens to make the value equal at runtime, the reset is intentional defensive test code. A new redundantAssignment warning here is noise produced by questionable reasoning, likely caused by the new symbolic +/- values. This is likely a false positive. ---- 19 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/krb5/krb5_1.22.1.orig.tar.gz Result: your krb5-1.22.1/src/lib/krb5/ccache/cc_file.c:449:5: style: Variable 'version' is assigned an expression that holds the same value. [redundantAssignment] krb5-1.22.1/src/lib/krb5/ccache/cc_file.c:446:17: note: version is assigned 'context->fcc_default_format-0x0500' here. krb5-1.22.1/src/lib/krb5/ccache/cc_file.c:449:5: note: Variable 'version' is assigned an expression that holds the same value. Explanation: Line 446 initializes 'version' to 'context->fcc_default_format - FVNO_BASE', and line 449 assigns exactly the same expression again. Nothing modifies 'context' or 'fcc_default_format' between the two lines. The reassignment is truly redundant, so this new redundantAssignment warning is a true positive. It comes from the PR's new symbolic value propagation through '+'/'-' with a constant. ---- 20 / 46 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libc/libctapimkt/libctapimkt_1.0.5~rc1.orig.tar.xz Result: your libctapimkt-1.0.5~rc1/ctapi.c:379:5: style: Variable 'lenblock' is assigned an expression that holds the same value. [redundantAssignment] libctapimkt-1.0.5~rc1/ctapi.c:372:13: note: lenblock is assigned 'len+3' here. libctapimkt-1.0.5~rc1/ctapi.c:377:25: note: Assuming condition is false libctapimkt-1.0.5~rc1/ctapi.c:379:5: note: Variable 'lenblock' is assigned an expression that holds the same value. Explanation: Line 372 sets `lenblock=len+3`. Line 379 assigns `lenblock=len+3` again. In between, only `apdu`, `response` and `i` are written: the copy loop and the `fxor` check. Neither `len` nor `lenblock` changes, so the second assignment really is redundant. The PR's new symbolic +/- propagation lets Cppcheck see this, so the warning is a new true positive. Confidence is medium only because the declaration of `len` is not shown; if it were a global changed inside `fxor`, the warning would be wrong, but that is unlikely. ---- 21 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libg/libgenome/libgenome_1.3.11+svn20110227.4616.orig.tar.xz Result: your libgenome-1.3.11+svn20110227.4616/libGenome/gnGBKSource.cpp:708:7: style: Variable 'sectionStart' is assigned an expression that holds the same value. [redundantAssignment] libgenome-1.3.11+svn20110227.4616/libGenome/gnGBKSource.cpp:705:28: note: Assuming that condition 'sectionStart==i' is not redundant libgenome-1.3.11+svn20110227.4616/libGenome/gnGBKSource.cpp:708:7: note: Variable 'sectionStart' is assigned an expression that holds the same value. Explanation: The new redundantAssignment warning at line 708 is a true positive. Inside the branch `sectionStart == i`, the code does `i--` and then `sectionStart = i + 1`. That sets `sectionStart` back to the old `i`, which already equals `sectionStart`, so the assignment has no effect. The PR's new symbolic tracking of `+`/`-` with constants lets Cppcheck follow `i - 1 + 1 == sectionStart` and see this. The warning correctly points out a redundant statement. ---- 22 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libg/libgenome/libgenome_1.3.11+svn20110227.4616.orig.tar.xz Result: your libgenome-1.3.11+svn20110227.4616/libGenome/gnSEQSource.cpp:468:7: style: Variable 'sectionStart' is assigned an expression that holds the same value. [redundantAssignment] libgenome-1.3.11+svn20110227.4616/libGenome/gnSEQSource.cpp:465:28: note: Assuming that condition 'sectionStart==i' is not redundant libgenome-1.3.11+svn20110227.4616/libGenome/gnSEQSource.cpp:468:7: note: Variable 'sectionStart' is assigned an expression that holds the same value. Explanation: Inside the branch `sectionStart == i`, the code does `i--` and then `sectionStart = i + 1`. Since `i + 1` after the decrement equals the old `i`, which already equals `sectionStart`, the assignment stores the value `sectionStart` already holds. This is still true for unsigned wraparound. The PR's new symbolic tracking for `+`/`-` with constants lets Cppcheck see this, so the new redundantAssignment warning is a true positive. ---- 23 / 46 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libi/libics/libics_1.7.0.orig.tar.gz Result: your libics-1.7.0/libics_util.c:190:5: style: Variable 'ext' is assigned an expression that holds the same value. [redundantAssignment] libics-1.7.0/libics_util.c:185:9: note: ext is assigned 'str+len-(sizeof(ICSEXT)-1)' here. libics-1.7.0/libics_util.c:186:20: note: Assuming condition is false libics-1.7.0/libics_util.c:190:5: note: Variable 'ext' is assigned an expression that holds the same value. Explanation: Line 185 sets ext = str+len-(sizeof(ICSEXT)-1) and line 190 sets ext = str+len-(sizeof(IDSEXT)-1). ICSEXT (".ics") and IDSEXT (".ids") happen to have the same length, so the value is numerically the same. The two expressions still use different macros, and the code is a deliberate parallel pattern: each extension check computes its own offset. Removing the line 190 assignment would make the code fragile and less readable. The new symbolic +/- propagation lets Cppcheck spot the equal value, but the redundantAssignment warning is noise users would treat as a false positive. Cppcheck normally avoids such warnings when the expressions differ only through macros or sizeof. ---- 24 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/MPI/pairlocalalign_mpi.c:428:25: style: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/MPI/pairlocalalign_mpi.c:427:8: note: naln is assigned 'prevnaln+1' here. mafft-7.525-without-extensions/MPI/pairlocalalign_mpi.c:428:25: note: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. Explanation: `prevnaln` is read from `lastresx[name1][name2].naln` at line 399, so `naln = prevnaln + 1` is one more than the stored value. Line 428 therefore increments the field; it does not assign the same value. The PR adds symbolic values with nonzero offsets for `+`/`-`, so `naln` now carries the symbolic value `lastresx[..].naln + 1`. The redundantAssignment check apparently ignores that offset and reports the assignment as redundant. This is a new false positive. ---- 25 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/MPI/pairlocalalign_mpi.c:656:25: style: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/MPI/pairlocalalign_mpi.c:655:8: note: naln is assigned 'prevnaln+1' here. mafft-7.525-without-extensions/MPI/pairlocalalign_mpi.c:656:25: note: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. Explanation: The code reads `prevnaln = lastresx[name1][name2].naln`, then sets `naln = prevnaln + 1` and writes `lastresx[name1][name2].naln = naln`. The stored value goes up by one, so the assignment is not redundant. The new symbolic +/- constant handling seems to have tracked the offset wrongly (or dropped it) and decided the two sides are equal. This is a new false positive. ---- 26 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/Lalignmm.c:1726:5: style: Variable 'ijpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/Lalignmm.c:1717:9: note: ijpi is assigned 'i+1' here. mafft-7.525-without-extensions/core/Lalignmm.c:1722:10: note: Assuming condition is true mafft-7.525-without-extensions/core/Lalignmm.c:1726:5: note: Variable 'ijpi' is assigned an expression that holds the same value. Explanation: At line 1717 `ijpi = i+1;` runs unconditionally. At line 1726, inside `if( g > wm )`, `ijpi = i+1;` runs again. Between the two lines neither `i` nor `ijpi` changes; only `ijpj`, `g` and `wm` are touched. So the second assignment stores the value the variable already holds, and the redundantAssignment warning is a true positive. The PR lets ValueFlow track symbolic values through `+` and `-` with a constant, so Cppcheck can now see that `i+1` equals the earlier `i+1`. This is a new correct finding. ---- 27 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/Lalignmm.c:1850:5: style: Variable 'jumpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/Lalignmm.c:1815:9: note: Assuming that condition 'i==imid-1' is not redundant mafft-7.525-without-extensions/core/Lalignmm.c:1846:16: note: Assignment 'jumpi=imid-1', assigned value is symbolic=i mafft-7.525-without-extensions/core/Lalignmm.c:1848:17: note: Assuming condition is true mafft-7.525-without-extensions/core/Lalignmm.c:1846:10: note: jumpi is assigned 'imid-1' here. mafft-7.525-without-extensions/core/Lalignmm.c:1848:17: note: Assuming condition is true mafft-7.525-without-extensions/core/Lalignmm.c:1850:5: note: Variable 'jumpi' is assigned an expression that holds the same value. Explanation: At line 1846 `jumpi = imid-1;` is executed unconditionally. Nothing between it and line 1850 changes `jumpi` or `imid`: only `jumpj` is assigned, and the condition reads `jmid`/`midn`. So `jumpi = imid-1;` inside the if at line 1850 stores a value `jumpi` already holds, and the assignment is redundant. The new symbolic value tracking (`imid-1` == `i` inside `if (i == imid-1)`) lets Cppcheck see this. The path notes are a bit odd but harmless, and the warning itself is a correct new true positive. ---- 28 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/Lalignmm.c:826:5: style: Variable 'ijpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/Lalignmm.c:817:9: note: ijpi is assigned 'i+1' here. mafft-7.525-without-extensions/core/Lalignmm.c:822:10: note: Assuming condition is true mafft-7.525-without-extensions/core/Lalignmm.c:826:5: note: Variable 'ijpi' is assigned an expression that holds the same value. Explanation: Line 817 sets `ijpi = i+1` unconditionally. Between that line and line 826, neither `ijpi` nor `i` is modified: only `ijpj`, `g` and `wm` are touched. So `ijpi = i+1` inside the `if` at line 826 stores the value `ijpi` already holds. The assignment is genuinely redundant, which makes this a true positive. The PR's new symbolic values for `+`/`-` with a constant let Cppcheck see this. ---- 29 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/Lalignmm.c:950:5: style: Variable 'jumpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/Lalignmm.c:915:9: note: Assuming that condition 'i==imid-1' is not redundant mafft-7.525-without-extensions/core/Lalignmm.c:946:16: note: Assignment 'jumpi=imid-1', assigned value is symbolic=i mafft-7.525-without-extensions/core/Lalignmm.c:948:17: note: Assuming condition is true mafft-7.525-without-extensions/core/Lalignmm.c:946:10: note: jumpi is assigned 'imid-1' here. mafft-7.525-without-extensions/core/Lalignmm.c:948:17: note: Assuming condition is true mafft-7.525-without-extensions/core/Lalignmm.c:950:5: note: Variable 'jumpi' is assigned an expression that holds the same value. Explanation: Line 946 sets `jumpi = imid-1`. Inside the following `if` (line 948), line 950 sets `jumpi = imid-1` again. Between the two assignments neither `jumpi` nor `imid` is modified; the condition only reads `jmid`, `midn` and `wm`. The second assignment is therefore truly redundant, so this new warning is a true positive. The new symbolic +/- constant values let Cppcheck see this. The note chain mentioning symbolic=i is a bit noisy, but the warning itself is correct. ---- 30 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/MSalignmm.c:1558:5: style: Variable 'ijpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/MSalignmm.c:1549:9: note: ijpi is assigned 'i+1' here. mafft-7.525-without-extensions/core/MSalignmm.c:1554:10: note: Assuming condition is true mafft-7.525-without-extensions/core/MSalignmm.c:1558:5: note: Variable 'ijpi' is assigned an expression that holds the same value. Explanation: Line 1549 sets `ijpi = i+1`. Line 1558, inside `if( g > wm )`, sets `ijpi = i+1` again. Between the two, neither `i` nor `ijpi` is changed; only `ijpj`, `wm` and `g` are. So the second assignment really stores the value `ijpi` already has, and the warning is correct. The PR's new symbolic values for `+`/`-` let Cppcheck see that both expressions are equal. The result is a new true positive. ---- 31 / 46 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/MSalignmm.c:1675:5: style: Variable 'jumpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/MSalignmm.c:1640:9: note: Assuming that condition 'i==imid-1' is not redundant mafft-7.525-without-extensions/core/MSalignmm.c:1671:16: note: Assignment 'jumpi=imid-1', assigned value is symbolic=i mafft-7.525-without-extensions/core/MSalignmm.c:1673:17: note: Assuming condition is true mafft-7.525-without-extensions/core/MSalignmm.c:1671:10: note: jumpi is assigned 'imid-1' here. mafft-7.525-without-extensions/core/MSalignmm.c:1673:17: note: Assuming condition is true mafft-7.525-without-extensions/core/MSalignmm.c:1675:5: note: Variable 'jumpi' is assigned an expression that holds the same value. Explanation: Line 1671 assigns `jumpi = imid-1`. Nothing between that line and line 1675 changes `jumpi` or `imid`: line 1672 assigns `jumpj` and line 1673 is only a condition. So the assignment `jumpi = imid-1` inside the if-block stores the value `jumpi` already holds, and it is really redundant. The author probably wrote it for symmetry with the other branch, but the warning is technically correct. The PR's new symbolic tracking of `+`/`-` with constants lets Cppcheck detect it, so this is a new true positive. ---- 32 / 46 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/MSalignmm.c:3458:5: style: Variable 'ijpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/MSalignmm.c:3449:9: note: ijpi is assigned 'i+1' here. mafft-7.525-without-extensions/core/MSalignmm.c:3454:10: note: Assuming condition is true mafft-7.525-without-extensions/core/MSalignmm.c:3458:5: note: Variable 'ijpi' is assigned an expression that holds the same value. Explanation: Line 3449 sets `ijpi = i+1` unconditionally. Between that line and line 3458, neither `ijpi` nor `i` changes (only `ijpj`, `g` and `wm` are touched). So `ijpi = i+1` inside the `if( g > wm )` block writes a value `ijpi` already holds, and the assignment is truly redundant. The PR's new symbolic values for `+`/`-` let Cppcheck see that both expressions are equal. This is a new true positive. The author may have kept the line for symmetry, but the style warning is factually correct. ---- 33 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/MSalignmm.c:3575:5: style: Variable 'jumpi' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/MSalignmm.c:3540:9: note: Assuming that condition 'i==imid-1' is not redundant mafft-7.525-without-extensions/core/MSalignmm.c:3571:16: note: Assignment 'jumpi=imid-1', assigned value is symbolic=i mafft-7.525-without-extensions/core/MSalignmm.c:3573:17: note: Assuming condition is true mafft-7.525-without-extensions/core/MSalignmm.c:3571:10: note: jumpi is assigned 'imid-1' here. mafft-7.525-without-extensions/core/MSalignmm.c:3573:17: note: Assuming condition is true mafft-7.525-without-extensions/core/MSalignmm.c:3575:5: note: Variable 'jumpi' is assigned an expression that holds the same value. Explanation: Line 3571 sets `jumpi = imid-1`. Line 3575, inside the following `if`, sets `jumpi = imid-1` again. Nothing in between changes `jumpi` or `imid`: only `jumpj` is assigned, and the condition reads `jmid`, `midn` and `wm`. So the second assignment really does store the value `jumpi` already holds. The new symbolic +/- values (`imid-1` gets symbolic=i inside `i == imid-1`) let Cppcheck prove this. The diagnostic path is a bit roundabout, but the warning is a true positive. ---- 34 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/mltaln9.c:12310:5: style: Variable 'plim' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/mltaln9.c:12304:10: note: plim is assigned 'nlenmax+1' here. mafft-7.525-without-extensions/core/mltaln9.c:12310:5: note: Variable 'plim' is assigned an expression that holds the same value. Explanation: Line 12304 sets `plim = nlenmax+1`. The loop that follows only changes `pk` and `overlp` and reads `ini`/`inj`, with no function calls. So neither `plim` nor `nlenmax` changes before line 12310 assigns `plim = nlenmax+1` again. The second assignment really is redundant. The new symbolic value for `nlenmax+1` lets Cppcheck see this, so this is a newly found true positive. ---- 35 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/pairlocalalign.c:427:25: style: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/pairlocalalign.c:426:8: note: naln is assigned 'prevnaln+1' here. mafft-7.525-without-extensions/core/pairlocalalign.c:427:25: note: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. Explanation: `prevnaln` is read from `lastresx[name1][name2].naln`, and then `naln = prevnaln + 1`. So line 427 sets the field to its old value plus one, a real change, and the assignment is not redundant. The new symbolic +/- propagation gives `naln` the symbolic value `lastresx[..].naln+1`. The redundantAssignment check apparently treats that as the same value and ignores the non-zero offset, so this is a new false positive. ---- 36 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mafft/mafft_7.525.orig.tar.gz Result: your mafft-7.525-without-extensions/core/pairlocalalign.c:655:25: style: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. [redundantAssignment] mafft-7.525-without-extensions/core/pairlocalalign.c:654:8: note: naln is assigned 'prevnaln+1' here. mafft-7.525-without-extensions/core/pairlocalalign.c:655:25: note: Variable 'lastresx[name1][name2].naln' is assigned an expression that holds the same value. Explanation: The code reads `prevnaln = lastresx[name1][name2].naln`, sets `naln = prevnaln + 1`, and then assigns `lastresx[name1][name2].naln = naln`. The stored value therefore grows by 1, so the assignment is not redundant. The new symbolic +/- propagation gives `naln` the symbolic value `lastresx[name1][name2].naln + 1`. The redundantAssignment check then wrongly treats that as the same value, ignoring the offset. This is a new false positive. ---- 37 / 46 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mailfromd/mailfromd_9.1.orig.tar.xz Result: your vars.bi:101:53: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable size [valueFlowBailoutIncompleteVar] Explanation: This is a debug bailout (valueFlowBailoutIncompleteVar) in an m4 template file (vars.bi), not C code that Cppcheck can properly parse. The PR only adds symbolic +/- values and an invalidFree skip. It does not touch incomplete-variable handling, so there is no clear reason this bailout should newly appear. It shows up together with new, doubtful knownConditionTrueFalse warnings on the m4 macro lines, so the analysis path clearly changed. The source does not show whether this reflects worse understanding or is just a side effect, and the message itself has little user impact. ---- 38 / 46 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mailfromd/mailfromd_9.1.orig.tar.xz Result: your vars.bi:21:78: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SYM_PRECIOUS [valueFlowBailoutIncompleteVar] Explanation: Line 21 is an `MF_VAR(...)` macro in an m4-preprocessed `.bi` file. `SYM_PRECIOUS` is not defined in this file, so it really is an incomplete variable whether or not the PR is applied. The PR only adds symbolic +/- values in valueflow and a skip in `checkInvalidFree`. Neither obviously explains why this valueFlowConditionExpressions bailout would newly appear for an unrelated, undefined identifier. It is a debug message, and the source shown does not let me tell whether it reflects worse understanding or just changed processing order or output. The new `knownConditionTrueFalse` warnings in the same file hint that analysis behaviour changed there, but that does not settle this line. ---- 39 / 46 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mailfromd/mailfromd_9.1.orig.tar.xz Result: your vars.bi:98:66: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MFAM_INET [valueFlowBailoutIncompleteVar] Explanation: vars.bi is an m4 template, not real C, so Cppcheck parses macro-expanded pseudo-code here. The new bailout says only that the function is skipped because the identifier MFAM_INET is unknown. That has nothing to do with the PR's symbolic +/- value change or its invalidFree change. The message probably appears only because the analysis now takes a different path through this file (the same lines also gain new knownConditionTrueFalse warnings). It does not show clearly better or worse understanding of the code, so its value to users cannot be judged from what is shown. ---- 40 / 46 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mailfromd/mailfromd_9.1.orig.tar.xz Result: your vars.bi:98:7: style: Condition '__s' is always true [knownConditionTrueFalse] Explanation: vars.bi is an m4 template, not real C. Line 98 is the m4 invocation `define_milter_address(server)`, so Cppcheck is analysing a garbled token stream. '__s' presumably comes from the MF_VAR_SET_STRING macro, whose definition is not shown. The PR adds symbolic values for +/- expressions, which apparently makes '__s' known non-null somewhere in this pseudo-function. Some arguments (hostbuf, path) are indeed non-null, but others (inet_ntoa results) are not, and the condition lives inside a macro. The new valueFlowBailoutIncompleteVar debug lines also show that the analysis changed on non-C input. Without the macro body, I cannot tell whether this is a real always-true condition or an artifact. ---- 41 / 46 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mailfromd/mailfromd_9.1.orig.tar.xz Result: your vars.bi:99:66: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MFAM_INET [valueFlowBailoutIncompleteVar] Explanation: This new line is a debug bailout (`valueFlowConditionExpressions` skipped because `MFAM_INET` is an incomplete variable). It comes from an m4 template file (`vars.bi`), where line 99 is a `define_milter_address(client)` macro invocation rather than real C code. The PR only adds symbolic +/- values and an `invalidFree` filter. Neither change obviously explains why this bailout would now be reported for this function. It may be a side effect of analysis order or of the function now being reached, which also produces new `__s` `knownConditionTrueFalse` warnings. The macro-expanded code is not shown, so it cannot be determined whether this reflects better or worse understanding. ---- 42 / 46 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/m/mailfromd/mailfromd_9.1.orig.tar.xz Result: your vars.bi:99:7: style: Condition '__s' is always true [knownConditionTrueFalse] Explanation: Line 99 is an m4 macro call (`define_milter_address(client)`). The `__s` condition comes from a macro expansion, probably `MF_VAR_SET_STRING`, whose definition is not shown. It is not visible how `__s` is computed or why the PR's new symbolic +/- values would make it known true. Some arguments are plausibly non-null (e.g. the `hostbuf` array, or `path`, which is `""` or `sun_path`), so the warning could be technically correct. Even so, an always-true check inside a generic macro is usually noise, and the source shown is not enough to decide. ---- 43 / 46 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/opencpn/opencpn_5.14.2+dfsg.orig.tar.xz Result: your opencpn-5.14.2/plugins/grib_pi/libs/jasper/src/jpc/jpc_t2enc.c:312:13: style: Variable 'lastpass' is assigned an expression that holds the same value. [redundantAssignment] opencpn-5.14.2/plugins/grib_pi/libs/jasper/src/jpc/jpc_t2enc.c:290:22: note: lastpass is assigned 'endpass-1' here. opencpn-5.14.2/plugins/grib_pi/libs/jasper/src/jpc/jpc_t2enc.c:307:33: note: Assuming condition is false opencpn-5.14.2/plugins/grib_pi/libs/jasper/src/jpc/jpc_t2enc.c:312:13: note: Variable 'lastpass' is assigned an expression that holds the same value. Explanation: Line 290 sets `lastpass = endpass - 1`. Between line 290 and line 312, neither `lastpass` nor `endpass` is modified: the loop only changes `pass`, `n`, `passcount` and `maxadjust`, and the calls do not take the address of either local. So reassigning `endpass - 1` at line 312 gives the variable the value it already holds. The PR adds symbolic values for `+`/`-` with a constant, which lets Cppcheck see this. The warning is a correct, newly found style true positive, even if the repetition was probably written on purpose for readability. ---- 44 / 46 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/unicon/unicon_3.0.4+dfsg1.orig.tar.xz Result: your unicon-3.0.4/unicon/ImmModules/cce/xl_pinyin.c:1025:34: warning: Either the condition 'ch=='z'' is redundant or the array 'pytab[26][0]' is accessed at index pytab[122][*], which is out of bounds. [arrayIndexOutOfBoundsCond] unicon-3.0.4/unicon/ImmModules/cce/xl_pinyin.c:1033:32: note: Assuming that condition 'ch=='z'' is not redundant unicon-3.0.4/unicon/ImmModules/cce/xl_pinyin.c:1022:7: note: Assignment from 'ahead=pinyin[i][0]-'a'' unicon-3.0.4/unicon/ImmModules/cce/xl_pinyin.c:1025:34: note: Array index out of bounds Explanation: `ahead = pinyin[i][0] - 'a'`. Line 1019 skips any character outside 'a'..'z', so `ahead` is always in 0..25. When `ch == 'z'`, `ahead` is 25, which is a valid index into `pytab[26]`. The new warning claims the index is 122, which is the raw value of 'z' with the `- 'a'` offset dropped. The new symbolic +/- value handling in the PR evidently mixes up `ch`'s value with `ahead`'s. This is a false positive introduced by the PR. ---- 45 / 46 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/v/visualboyadvance/visualboyadvance_1.8.0.dfsg.orig.tar.gz Result: your VisualBoyAdvance-1.8.0/src/bilinear.cpp:257:14: style: Condition 'width+1