AI review of 2026-11-25_07-54-57-fe0ca314ea2e-results.txt PR: #8996 https://github.com/cppcheck-opensource/cppcheck/pull/8996 Tested: fe0ca314ea2e8482914dd6e1147caf11b6dc5f9e Merge base: 4ccfcc6ff3df225b62a02318b2f34a722b1beecc Reviewed: 2026-11-26 01:55:28 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 130 in the report (random sample) Verdicts: 27 improvement, 2 neutral, 19 regression, 2 unclear Tokens: 93491 input, 158280 cache read, 39570 cache write, 37116 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/aespipe/aespipe_2.4j.orig.tar.bz2 Result: your aespipe-v2.4j/aespipe.c:719:22: style: Variable 'dip' can be declared as pointer to const [constVariablePointer] Explanation: In generic_multikey_encrypt, `dip` is only used to read: `bfp[0] ^= dip[0]` and `bfp[1] ^= dip[1]`. It is reassigned to `&ivbuf[0]`, `&ivbuf[2]` and `bfp`, but reassigning the pointer itself is allowed for `const u_int64_t *`. The rest of the function appears to follow the same pattern, though only part of it is shown. Before the PR, Cppcheck wrongly treated `dip[0]` as changed because it appears inside a compound assignment. The PR fixes that, so this new warning is a correct true positive. ---- 2 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/avfs/avfs_1.3.0.orig.tar.bz2 Result: main avfs-1.3.0/test/gzip_multimember_test.c:40:9: error: Uninitialized variable: total_len [legacyUninitvar] Explanation: total_len is declared without an initializer and then read by 'total_len += len' on line 40, so it really is uninitialized. The removed legacyUninitvar error is replaced by an uninitvar warning at the same location, and the PR's new test expects this. The true positive is still reported, just by a different checker. The new severity is 'warning' instead of 'error', which may be slightly less strict, but overall users see the same bug. ---- 3 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/avfs/avfs_1.3.0.orig.tar.bz2 Result: your avfs-1.3.0/zlib/deflate.c:752:21: style: Variable 'strend' can be declared as pointer to const [constVariablePointer] Explanation: In zlib's longest_match, `strend` is never written through. However, its value flows into the non-const `Bytef *scan` via `scan = strend - MAX_MATCH;` (and `strend - (MAX_MATCH-1)` in the UNALIGNED_OK path). If `strend` were declared `const Bytef *`, that assignment would discard the const qualifier: a compile error in C++ and a diagnostic in C. So the new constVariablePointer warning is not actionable unless `scan` is changed too. The PR's relaxed isVariableChanged handling of compound assignments (e.g. `scan += 2`, `scan++` arithmetic) seems to have lost track of this pointer escape. This is a new false positive. ---- 4 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bash/bash_5.3.orig.tar.xz Result: your bash-5.3/subst.c:2842:9: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] bash-5.3/subst.c:2825:32: note: Assuming allocation function fails bash-5.3/subst.c:2825:14: note: Assignment 'r=result=(char*)xmalloc(result_size+1)', assigned value is 0 bash-5.3/subst.c:2829:21: note: Assuming condition is false bash-5.3/subst.c:2842:9: note: Null pointer addition Explanation: The new warning claims `r += word_len` adds to a NULL pointer if `xmalloc` fails. Bash's `xmalloc` never returns NULL: on allocation failure it calls a fatal error routine and exits. So the out-of-memory path the warning relies on cannot happen, and the warning is a false positive. It is also oddly placed. If `r` really were NULL, the earlier `FASTCOPY(..., r, ...)` write on the same path would be the first problem. The warning appears only because the PR now treats compound assignment (`+=`) as a read of the tracked value, which exposes this unreachable path. That makes it a newly added false positive. ---- 5 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/box2d/box2d_2.4.1.orig.tar.gz Result: your box2d-2.4.1/extern/glfw/src/x11_window.c:499:12: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] box2d-2.4.1/extern/glfw/src/x11_window.c:495:26: note: Assuming allocation function fails box2d-2.4.1/extern/glfw/src/x11_window.c:495:26: note: Assignment 'target=calloc(size,1)', assigned value is 0 box2d-2.4.1/extern/glfw/src/x11_window.c:496:16: note: Assignment 'tp=target', assigned value is 0 box2d-2.4.1/extern/glfw/src/x11_window.c:499:12: note: Null pointer addition Explanation: `target = calloc(size, 1)` is not checked, and `tp = target`. If the allocation fails, `tp` is NULL and `tp += encodeUTF8(tp, *sp)` performs pointer arithmetic on NULL whenever `source` is non-empty, which is undefined behaviour. This is a genuine out-of-memory issue of the kind the nullPointerArithmeticOutOfMemory check targets. Before the PR, the compound assignment `tp += ...` was apparently treated like a plain reassignment, so the null value was dropped before the addition was checked. The PR now keeps the value as read-before-modify, matching its updated unit test (`p += a` now gives nullPointerArithmetic). This is a new true positive. ---- 6 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/cdcd/cdcd_0.6.6.orig.tar.gz Result: your cdcd-0.6.6/cmd_cdcd.c:233:4: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] cdcd-0.6.6/cmd_cdcd.c:219:32: note: Assuming allocation function fails cdcd-0.6.6/cmd_cdcd.c:219:13: note: Assignment 'p=ret=(char*)xmalloc(size)', assigned value is 0 cdcd-0.6.6/cmd_cdcd.c:233:4: note: Null pointer addition Explanation: The new warning claims `p` can be NULL at `p += strlen(*s)` because `xmalloc` might fail. By convention `xmalloc` aborts or exits on failure and never returns NULL, so this out-of-memory path does not exist. Even if it did, `strcpy(p, *s)` on line 232 would already dereference NULL before the pointer addition, so this warning adds nothing useful. The PR now makes the compound assignment `p +=` invalidate and read the value, which exposes this spurious OOM path. This is a new false positive, or at best noise. ---- 7 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/criu/criu_4.3.1.orig.tar.xz Result: your checkpoint-restore-criu-2f7a515/test/zdtm/static/cow01.c:308:7: error:inconclusive: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] checkpoint-restore-criu-2f7a515/test/zdtm/static/cow01.c:296:13: note: Assuming allocation function fails checkpoint-restore-criu-2f7a515/test/zdtm/static/cow01.c:296:13: note: Assignment 'addr=mmap(NULL,PAGE_SIZE*((2<<6)+2),PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0)', assigned value is 0 checkpoint-restore-criu-2f7a515/test/zdtm/static/cow01.c:308:7: note: Null pointer addition Explanation: The PR makes compound assignments like `addr += PAGE_SIZE` count as a read of the old value. Cppcheck now carries the 'allocation failed, addr is 0' value from `mmap` (line 296) to line 308. But `mmap` reports failure with MAP_FAILED, not NULL, and the code checks `addr == MAP_FAILED` and returns early. With a NULL address hint, `mmap` does not return 0 on success either, so `addr` cannot be NULL at line 308. The new nullPointerArithmeticOutOfMemory warning is a false positive. ---- 8 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/d/darktable/darktable_5.4.1.orig.tar.xz Result: your darktable-5.4.1/src/bauhaus/bauhaus.c:522:46: style: Parameter 'window' can be declared as pointer to const. However it seems that '_window_moved_to_rect' is a callback function, if 'window' is declared with const you might also need to cast function pointer(s). [constParameterCallback] darktable-5.4.1/src/bauhaus/bauhaus.c:899:3: note: You might need to cast the function pointer here darktable-5.4.1/src/bauhaus/bauhaus.c:522:46: note: Parameter 'window' can be declared as pointer to const Explanation: `_window_moved_to_rect` never uses `window`. It only does a compound assignment to `darktable.bauhaus->popup.offcut` from `final_rect` and `flipped_rect`. Declaring `window` as `const GdkWindow *` would therefore be valid. The message uses the callback variant and points to the `g_signal_connect` site at line 899, where a function-pointer cast would be needed, so it is accurate in Cppcheck's terms. The PR changes how compound assignments are treated in `isVariableChanged` and the analyzer, which plausibly removed a conservative bailout that hid this. The diff does not make the exact cause clear, and the warning is low value for a GTK signal callback. Still, it is technically correct, not a false positive. ---- 9 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/d/darktable/darktable_5.4.1.orig.tar.xz Result: your darktable-5.4.1/src/bauhaus/bauhaus.c:527:44: style: Parameter 'user_data' can be declared as pointer to const. However it seems that '_window_moved_to_rect' is a callback function, if 'user_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] darktable-5.4.1/src/bauhaus/bauhaus.c:899:3: note: You might need to cast the function pointer here darktable-5.4.1/src/bauhaus/bauhaus.c:527:44: note: Parameter 'user_data' can be declared as pointer to const Explanation: `user_data` is an unused `gpointer` parameter of a GTK signal callback. Only the body line 529 (`popup.offcut += final_rect->y - flipped_rect->y`) involves a compound assignment, and that does not touch `user_data`. So it is not clear why the PR's isVariableChanged/compound-assignment change makes this warning appear now. The warning is technically valid, since the parameter is never written, but it has little value: `const gpointer` does not make the pointee const, and a real change would need `gconstpointer` plus a cast at the `g_signal_connect` site, which the message itself admits. There is not enough information to tell whether this is a deliberate effect of the PR or an unrelated side effect. ---- 10 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/darktable/darktable_5.4.1.orig.tar.xz Result: your darktable-5.4.1/src/gui/gtk.c:196:53: style: Parameter 'action' can be declared as pointer to const. However it seems that '_toggle_tooltip_visibility' is a callback function, if 'action' is declared with const you might also need to cast function pointer(s). [constParameterCallback] darktable-5.4.1/src/gui/gtk.c:1552:22: note: You might need to cast the function pointer here darktable-5.4.1/src/gui/gtk.c:196:53: note: Parameter 'action' can be declared as pointer to const Explanation: In `_toggle_tooltip_visibility`, the parameter `action` is never used, so it could be declared `const dt_action_t *`. The new constParameterCallback warning is therefore technically correct, and its message already says the function-pointer registration at line 1552 may need a cast. The sibling callback `_fullscreen_key_accel_callback` has the same unused parameter and does not show up in the diff, which suggests both versions already report it. Main probably missed this one because of how the compound assignment `darktable.gui->hide_tooltips += ...` was handled; the PR tightens that handling. The new warning is a consistent true positive. ---- 11 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dextractor/dextractor_1.0.orig.tar.gz Result: your DEXTRACTOR-1.0/DB.c:1481:18: style: Variable 'dp' can be declared as pointer to const [constVariablePointer] Explanation: `dp` is a `struct dirent *`. Its member array is assigned to a non-const pointer: `name = dp->d_name;` with `char *name`. If `dp` were declared `const struct dirent *`, `dp->d_name` would become `const char[]`. Assigning it to `char *name` would discard the qualifier, which is a compiler warning in C and an error in C++. So the suggestion cannot be applied without changing `name` too. Main correctly treated this assignment as escaping non-const access. The new constVariablePointer warning looks like a false positive, probably from the changed assignment handling in isVariableChanged. The rest of the function is not shown, so confidence is limited. ---- 12 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/doomsday/doomsday_2.3.1+ds1.orig.tar.xz Result: your doomsday-2.3.1/doomsday/apps/client/src/render/drawlist.cpp:339:16: error: Pointer addition with NULL pointer. [nullPointerArithmetic] doomsday-2.3.1/doomsday/apps/client/src/render/drawlist.cpp:262:22: note: Assignment 'cursor=nullptr', assigned value is 0 doomsday-2.3.1/doomsday/apps/client/src/render/drawlist.cpp:292:13: note: Assuming condition is false doomsday-2.3.1/doomsday/apps/client/src/render/drawlist.cpp:301:22: note: Assuming condition is false doomsday-2.3.1/doomsday/apps/client/src/render/drawlist.cpp:339:16: note: Null pointer addition Explanation: This new nullPointerArithmetic comes from the PR now treating compound assignment (`cursor += bytes`) as Read|Invalid, which keeps the earlier `cursor = nullptr` value alive on line 339. In this DrawList code, `cursor` is null only when no buffer has been allocated yet, i.e. `data` is null and `dataSize` is 0. In that state `required` (`startOffset + bytes + headroom`) is always greater than `dataSize`, so the reallocation branch runs. That branch sets `cursor` to `data` or `data + offset` before line 339. The path cppcheck assumes, with `required > dataSize` false while `cursor` is null, is therefore infeasible. This is very likely a false positive. Lines 262–292 are not shown, so the exact link between `cursor` and `dataSize` there is not confirmed. ---- 13 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/exim4/exim4_4.100.1.orig.tar.xz Result: main exim-4.100.1/exim_monitor/em_menu.c:495:25: warning: Uninitialized variable: x [uninitvar] exim-4.100.1/exim_monitor/em_menu.c:483:23: note: Assuming condition is false exim-4.100.1/exim_monitor/em_menu.c:495:25: note: Uninitialized variable: x Explanation: `&x` is stored in `get_pos_args[0].value` and `XtGetValues(dialog_ref_widget, get_pos_args, 2)` then writes the position into `x` before line 495. So `x` is initialized when it is read at line 495, and main's uninitvar warning there was a false positive. Removing it is good. The new warnings at lines 488/489 are false positives too, but they are separate diff lines; this result is only the removal at line 495. ---- 14 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/exim4/exim4_4.100.1.orig.tar.xz Result: your exim-4.100.1/exim_monitor/em_menu.c:488:3: warning: Uninitialized variable: x [uninitvar] exim-4.100.1/exim_monitor/em_menu.c:483:23: note: Assuming condition is true exim-4.100.1/exim_monitor/em_menu.c:488:3: note: Uninitialized variable: x Explanation: Line 475 stores `&x` (cast to XtArgVal) into the global `get_pos_args`, and `XtGetValues(dialog_ref_widget, get_pos_args, 2)` then writes `x` through that pointer. So `x` is initialized before `x += xx;` at line 488. Cppcheck does not track the address escaping through the integer cast into the global array. The new uninitvar warning on the compound assignment, which the PR now treats as a read, is therefore a false positive. Main already had an equivalent false positive at line 495 that this PR removed, so the false positive mostly moved. Still, the line under review is a newly added false positive. ---- 15 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/fastml/fastml_3.11.orig.tar.gz Result: your FastML.v3.11/libs/phylogeny/Parameters.cpp:157:51: style: Parameter 'paramList' can be declared as reference to const [constParameterReference] Explanation: The function's return type is the non-const `ParamList::iterator`, and it returns `it`, which is initialised from `paramList.begin()` and then advanced with `it += stop`. If `paramList` were a const reference, `begin()` would return a `const_iterator`, which cannot convert to `iterator`, so the code would no longer compile. The new constParameterReference warning is therefore a false positive. It appears because the PR's compound-assignment change (`it += stop`) no longer treats the iterator alias as modifying the container. ---- 16 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/ggml/ggml_1.0.0.orig.tar.gz Result: your ggml-org-ggml-1d3d8b2/src/ggml-hexagon/htp/hmx-fa-kernels.h:124:20: style: Parameter 'o_tile_out' can be declared as pointer to const [constParameterPointer] Explanation: `o_tile_out` is the output tile. The function writes through it in inline assembly (`HMX_STORE_AFTER_F16` with a "memory" clobber, the same pattern as `out_tile` in the previous function). Cppcheck does not see the asm operands as modifications. Declaring the pointer as pointer-to-const would be semantically wrong and misleading. The new constParameterPointer warning is therefore a false positive introduced by the PR's changes to `isVariableChanged`. ---- 17 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/ggml/ggml_1.0.0.orig.tar.gz Result: your ggml-org-ggml-1d3d8b2/src/ggml-hexagon/htp/hmx-fa-kernels.h:54:20: style: Parameter 'out_tile' can be declared as pointer to const [constParameterPointer] Explanation: `out_tile` is the output buffer of an HMX tile kernel, and the visible body only touches the hardware through inline `asm volatile` blocks. Cppcheck drops asm operands, so it cannot see the store through `out_tile` that the asm (outside the visible lines) most likely performs. Before the PR, some other use of `out_tile`, probably pointer arithmetic or a compound assignment, kept Cppcheck from suggesting const. The PR no longer counts `p += n` as modifying `*p`. That is correct in general, but here it removes the only thing that suppressed the warning. Making an output tile pointer const would be semantically wrong, so this is most likely a new false positive. ---- 18 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/glusterfs/glusterfs_11.2.orig.tar.gz Result: your glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:177:5: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:168:17: note: Assuming allocation function fails glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:168:17: note: Assignment 'start=mmap(NULL,nleft,PROT_READ,MAP_PRIVATE,from_fd,0)', assigned value is 0 glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:175:11: note: mover is assigned 'start' here. glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:177:5: note: Null pointer addition Explanation: `start` comes from mmap(), which signals failure with MAP_FAILED ((void*)-1), not NULL. The code checks `start == MAP_FAILED` and jumps to `out`, so `mover = start` can never be NULL when MOVER_MOVE (`mover += offset`) runs. The PR now treats compound assignment as a read of the old value, so the assumed-NULL allocation result reaches the `+=` and gets reported. The warning is a false positive for this code. ---- 19 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/glusterfs/glusterfs_11.2.orig.tar.gz Result: your glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:284:5: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:275:17: note: Assuming allocation function fails glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:275:17: note: Assignment 'start=mmap(NULL,nleft,PROT_READ,MAP_PRIVATE,from_fd,0)', assigned value is 0 glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:282:11: note: mover is assigned 'start' here. glusterfs-11.2/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c:284:5: note: Null pointer addition Explanation: `start` comes from `mmap()`, which signals failure with `MAP_FAILED` ((void*)-1), not NULL. The code checks `start == MAP_FAILED` and bails out. So `mover = start` cannot be NULL when `MOVER_MOVE` (mover += offset) runs. Cppcheck wrongly assumes the allocation function returns 0 on failure. Before this PR, the compound assignment stopped the value from propagating. Now the assumed null value reaches the pointer addition, which adds a false positive. ---- 20 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnutls28/gnutls28_3.8.14.orig.tar.xz Result: your gnutls-3.8.14/lib/ext/early_data.c:79:25: style: Parameter 'extdata' can be declared as pointer to const. However it seems that 'early_data_send_params' is a callback function, if 'extdata' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gnutls-3.8.14/lib/ext/early_data.c:48:15: note: You might need to cast the function pointer here gnutls-3.8.14/lib/ext/early_data.c:79:25: note: Parameter 'extdata' can be declared as pointer to const Explanation: `early_data_send_params` never uses `extdata`: it only reads `session` and updates `session->internals.hsk_flags`. So the pointee is never modified, and declaring it as pointer to const would be correct. The function is used as a callback (`.send_func`), and Cppcheck emits `constParameterCallback` for exactly that case, adding the cast note. That makes the new warning factually correct under Cppcheck's own rules. It is of limited practical value because the parameter is unused and the signature is fixed by the callback type. It is also unclear why this PR makes it appear, since the change only concerns compound assignments and array access. Given those doubts, I rate it a low-confidence improvement. ---- 21 / 50 ---- Verdict: NEUTRAL (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gridengine/gridengine_8.1.9+dfsg.orig.tar.gz Result: main sge-8.1.9/source/dist/pvm/src/spmd.c:300:9: error: Uninitialized variable: a [legacyUninitvar] Explanation: `a` is declared without an initializer and then read by `a += b`, so the uninitialized-read warning is a true positive. The PR does not lose it. The legacyUninitvar report is replaced by an equivalent uninitvar report at the same line and column, from the valueflow-based checker. The 'main' line is half of a message-ID change; the warning itself is still reported. ---- 22 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gtk4/gtk4_4.24.1+ds.orig.tar.xz Result: your gtk-4.24.1/gdk/broadway/broadway-server.c:788:28: style: Variable 'mask' can be declared as pointer to const [constVariablePointer] Explanation: `mask` is set to NULL or to `data` and is used only for reading. In the GTK broadway websocket parser the unmasking loop is `data[i] ^= mask[i%4];`, where `mask` sits on the right-hand side of a compound assignment and only `data` is written. That usage is not in the shown excerpt, so this relies on the known shape of the GTK source. Before the PR, `isVariableChanged` treated any use under an assignment operator as a possible change, so `mask` was wrongly counted as modified. The PR fixes that for compound assignments, so `mask` can now be declared `const guchar *`. Assigning `data` (non-const) to a const pointer is fine. The new warning is a valid true positive. ---- 23 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/imagemagick/imagemagick_7.1.2.36+dfsg1.orig.tar.xz Result: your ImageMagick-ImageMagick-7289289/coders/sgi.c:862:6: style: Variable 'limit' can be declared as pointer to const [constVariablePointer] Explanation: In SGIEncode, `limit` is set once (`limit=p+length*4`) and then only used in comparisons like `p < limit`. It is never dereferenced for writing, and its address is never passed anywhere that could modify the pointee. So it can be declared `const unsigned char *`, and the new constVariablePointer warning is a true positive. The PR stops treating compound pointer arithmetic (`p+=...`) as a write through the pointer, which is why this is now found. The reported line (862) does not match the declaration in the shown source (869), but column 6 lines up with `*limit`, so the snippet is probably just slightly offset. ---- 24 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lensfun/lensfun_0.3.4.orig.tar.gz Result: your lensfun-0.3.4/libs/lensfun/mod-coord.cpp:462:17: style: Variable 'end' can be declared as pointer to const [constVariablePointer] Explanation: `end` is set to `iocoord + count * 2` and is only used in the comparison `iocoord < end`. Nothing is ever written through `end`; the writes go through `iocoord`. So `const float *end` is valid and the new constVariablePointer warning is a true positive. Before the PR, the compound assignments `iocoord[0] *= scale` were wrongly treated as modifying the pointed-to data of related pointers, which hid this warning. The PR fixes that, so this is a newly found true positive. ---- 25 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lensfun/lensfun_0.3.4.orig.tar.gz Result: your lensfun-0.3.4/libs/lensfun/mod-subpix.cpp:165:12: style: Variable 'param' can be declared as pointer to const [constVariablePointer] Explanation: In ModifyCoord_UnTCA_Linear, `param` is only read (`param[0]`, `param[1]`) to set the local floats `k_r` and `k_b`. Nothing is ever written through it, so it can be declared `const float *`. The same file already does exactly this at line 195 (`const float *param = (float *)data;`). Main most likely missed it because the compound assignments `iocoord[...] *= k_r` were wrongly treated as modifying the related pointer data. The PR fixes this handling of compound assignments in isVariableChanged, so the new warning is a true positive. ---- 26 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lensfun/lensfun_0.3.4.orig.tar.gz Result: your lensfun-0.3.4/libs/lensfun/mod-subpix.cpp:169:17: style: Variable 'end' can be declared as pointer to const [constVariablePointer] Explanation: `end` is set to `iocoord + count*6` and is only used in the loop condition `iocoord < end`. It is never dereferenced or written through, so `const float *end` would compile fine, because comparing `float*` with `const float*` is allowed. The warning is a true positive. Before the PR, the compound assignments `iocoord[0] *= k_r` were wrongly treated as changing the pointer value or alias, which suppressed it. The PR fixes that, so this is a newly found true positive. ---- 27 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lensfun/lensfun_0.3.4.orig.tar.gz Result: your lensfun-0.3.4/libs/lensfun/mod-subpix.cpp:180:12: style: Variable 'param' can be declared as pointer to const [constVariablePointer] Explanation: In ModifyCoord_TCA_Linear, 'param' is only read (param[0] and param[1] are copied into k_r and k_b) and is never written through, so it can be declared 'const float *'. The analogous function at line 195 already uses 'const float *param'. The new constVariablePointer warning is a true positive. The PR's more precise handling of compound assignments (e.g. 'iocoord[0] *= k_r') no longer wrongly treats the value read through 'param' as modified. ---- 28 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libc/libccrtp/libccrtp_2.0.9.orig.tar.gz Result: your ccrtp-2.0.9/src/rtppkt.cpp:115:23: style: Variable 'ext' can be declared as pointer to const [constVariablePointer] Explanation: `ext` is only used to read `ext->length`, on the right-hand side of `hdrSize += ...`, so it can be declared `const RTPHeaderExt *`. The cast would need adjusting, but that is fine since `block` is already const. Main treated the compound assignment as possibly modifying the pointee and missed this. The PR now limits that check correctly, so this is a new true positive. ---- 29 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libm/libmpeg3/libmpeg3_1.8.dfsg.orig.tar.bz2 Result: your libmpeg3-1.8/mpeg3ifo.c:547:27: style: Variable 'cell_addr' can be declared as pointer to const [constVariablePointer] Explanation: `cell_addr` is a local pointer initialized from `cell_info` and only used to read members (`vobu_start`, `vobu_last_end`, `chain_info`). Nothing is ever written through it, so it can be `const ifo_pgci_cell_addr_t *`. The warning is a true positive. Main probably missed it because it treated the compound assignment `cell_info += PGCI_CELL_ADDR_LEN` on the aliased pointer as modifying the pointed-to data. The PR fixes that: the compound assignment changes only the pointer, not the pointee. This new true positive is the kind the PR's added constVariablePointer test targets. ---- 30 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libr/libretro-desmume/libretro-desmume_0.9.11+git20260516+dfsg.orig.tar.xz Result: your libretro-desmume-0.9.11+git20260516/desmume/src/cheatSystem.cpp:1609:6: style: Variable 'gameTitlePtr' can be declared as pointer to const [constVariablePointer] Explanation: 'gameTitlePtr' is only read: it is the source of memcpy, is passed to strlen through a cast to const char*, and is cast to intptr_t to compute 'cmd'. Nothing is ever written through it. Declaring it 'const u8 *' would compile, since a C-style cast from a const pointer to intptr_t is allowed. The new constVariablePointer warning is therefore a true positive, probably uncovered because the PR no longer treats unrelated compound assignments as writes through the pointer. ---- 31 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libv/libvpx/libvpx_1.17.0.orig.tar.gz Result: main libvpx-1.17.0/vpx_dsp/arm/idct32x32_add_neon.c:530:31: warning: Uninitialized variable: input_pass2 [uninitvar] libvpx-1.17.0/vpx_dsp/arm/idct32x32_add_neon.c:518:32: note: Assignment 'input_pass2=pass1', assigned value is libvpx-1.17.0/vpx_dsp/arm/idct32x32_add_neon.c:530:31: note: Uninitialized variable: input_pass2 Explanation: This is a false positive in both versions. `input_pass2` points to `pass1`. During the first outer iteration (`idct32_pass_loop == 0`), `pass1` is filled through the aliasing pointer `out = pass1`. `input_pass2` is only read in the second iteration (`idct32_pass_loop == 1`), after `pass1` has been written. Main reported this at the lower 'warning' severity. With the PR it becomes an 'error', likely because the compound assignment `input_pass2 += 32*8` is now handled differently in valueflow. Removing the main line is not a fix: the same false positive is now reported with more confidence. ---- 32 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libv/libvpx/libvpx_1.17.0.orig.tar.gz Result: your libvpx-1.17.0/vpx_dsp/arm/idct32x32_add_neon.c:530:31: error: Uninitialized variable: input_pass2 [uninitvar] libvpx-1.17.0/vpx_dsp/arm/idct32x32_add_neon.c:518:32: note: Assignment 'input_pass2=pass1', assigned value is libvpx-1.17.0/vpx_dsp/arm/idct32x32_add_neon.c:530:31: note: Uninitialized variable: input_pass2 Explanation: This is the same false positive in both versions, but the PR raises it from warning to error. `input_pass2` points to `pass1`. On the first outer iteration, `out = pass1`, and the band loop writes the pass-1 results into `pass1` through `out`. `input_pass2` is only read in the second outer iteration (`idct32_pass_loop == 1`), after `pass1` has been filled. Cppcheck does not see the writes through the aliasing pointer `out`, so the warning was already wrong. The PR's new handling of compound assignment (`input_pass2 += 32*8`) makes it treat the uninit value as certain and report a severity 'error'. A false positive reported with more certainty is worse for users. ---- 33 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/micropolis-activity/micropolis-activity_0.0.20071228.orig.tar.gz Result: your micropolis-activity/src/tcl/tclenv.c:264:7: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] micropolis-activity/src/tcl/tclenv.c:261:18: note: Assuming allocation function fails micropolis-activity/src/tcl/tclenv.c:261:9: note: Assignment 'p=(char*)malloc((unsigned int)(nameLength+strlen(value)+2))', assigned value is 0 micropolis-activity/src/tcl/tclenv.c:264:7: note: Null pointer addition Explanation: The warning points at `p += nameLength` (line numbers are offset by 3 in the report). `p` comes straight from `ckalloc`/`malloc` and is never checked for NULL. If allocation fails, `p` is NULL and `p += nameLength` is pointer arithmetic on a NULL pointer, which is undefined behaviour. Before the PR, `isVariableChanged` treated the compound assignment `p += ...` as a plain write that killed the null value. Now it correctly sees that the old value is read, so the null value reaches the addition. The unchecked allocation is real, so this is a valid new nullPointerArithmeticOutOfMemory finding, matching the PR's updated test expectation. ---- 34 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/n/netcdf/netcdf_4.10.1.orig.tar.gz Result: your netcdf-c-4.10.1/libdispatch/ezxml_extra.c:18:34: style: Parameter 'countp' can be declared as pointer to const [constParameterPointer] Explanation: `countp` is never used in the body of `ezxml_all_attr`. Nothing is ever written through it, so declaring it `const int*` would compile, and the new warning is technically a true positive. It also points at a real defect: the function computes `count` but never stores it into `*countp`. It is not obvious why main stayed silent here, since the PR's compound-assignment change touches `count`, not `countp`. That is why confidence is low. ---- 35 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/o/openni-sensor-primesense/openni-sensor-primesense_5.1.0.41.orig.tar.gz Result: your Sensor-Stable-5.1.0.41/Source/XnFormats/XnFormatsMirror.cpp:152:11: style: Variable 'pDestEnd' can be declared as pointer to const [constVariablePointer] Explanation: `pDestEnd` is only used in the comparison `pDest >= pDestEnd`. Nothing is ever written through it, so it can be declared `const XnUInt8*`; comparing it with the non-const `pDest` still compiles. Main probably missed this because it treated the compound assignment `pDest -= 4` as writing through the pointer. The PR fixes that by no longer counting compound assignments as changing pointed-to data, so this new constVariablePointer warning is a true positive. ---- 36 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/o/openssh-gssapi/openssh-gssapi_10.6p2.orig.tar.xz Result: your openssh-gssapi-10.6p2/openbsd-compat/blowfish.c:582:39: style: Parameter 'iv' can be declared as pointer to const [constParameterPointer] Explanation: In blf_cbc_encrypt, 'iv' is only read through (`data[j] ^= iv[j]`) and reassigned as a pointer (`iv = data`). Neither use writes through it, and assigning a `u_int8_t*` to a `const u_int8_t*` is valid. So 'iv' can be pointer to const and the new warning is a true positive. Main missed it because isVariableChanged treated `iv[j]` inside a compound assignment as a possible modification. The PR fixes that indirection handling, so this new true positive is an improvement. ---- 37 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/phoc/phoc_0.59.0.orig.tar.xz Result: your phoc-0.59.0/subprojects/wlroots-0.20.x/examples/rotation.c:102:18: error: Uninitialized variable: sample_output->x_vel [uninitvar] Explanation: `wl_list_for_each(sample_output, &sample->outputs, link)` is a Wayland list-iteration macro that assigns `sample_output` to each list element before the body runs. The elements are allocated with `calloc` and have `x_vel` explicitly set to 128 in `new_output_notify`. So `sample_output->x_vel += x_diff` reads an initialized field. The new uninitvar warning appears because the PR now treats compound assignment as a read, while Cppcheck does not understand that the macro initializes the iterator. The new warning is a false positive. ---- 38 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/polyml/polyml_5.8.1.orig.tar.gz Result: your polyml-5.8.1/libpolyml/libffi/src/moxie/ffi.c:180:9: style: Variable 'register_args_ptr' can be declared as pointer to const [constVariablePointer] Explanation: `register_args_ptr` is only initialized and later reassigned (`register_args_ptr = (char *)®ister_args[1];`). In the shown code nothing is ever written through it; it is effectively unused. Declaring it `const char *` would be valid, so the new constVariablePointer warning is a true positive. The PR changed how compound assignments such as `ptr += 4` count as modifications, which lets Cppcheck see that the pointee is never changed. Confidence is medium because the rest of the function is not shown, though in upstream libffi the variable is not used after this point. ---- 39 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/python2.7/python2.7_2.7.18.orig.tar.gz Result: your Python-2.7.18/Modules/_ctypes/libffi/src/moxie/ffi.c:180:9: style: Variable 'register_args_ptr' can be declared as pointer to const [constVariablePointer] Explanation: In the visible code, 'register_args_ptr' is initialized from 'register_args' and later reassigned to '(char *)®ister_args[1]'. Nothing in the shown lines writes through it; writes and pointer arithmetic go through 'ptr' instead. Reassigning the pointer variable itself is still allowed for a 'const char *', so the variable can be declared pointer to const. The new constVariablePointer warning therefore looks like a true positive. It probably appears now because the PR treats compound assignments more precisely in isVariableChanged. The rest of the function is not shown, which is why confidence is only medium. ---- 40 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qt3d-opensource-src/qt3d-opensource-src_5.15.19+dfsg.orig.tar.xz Result: your qt3d-everywhere-src-5.15.19/src/plugins/renderers/opengl/debug/imguirenderer.cpp:438:31: error:inconclusive: Pointer addition with NULL pointer. [nullPointerArithmetic] qt3d-everywhere-src-5.15.19/src/plugins/renderers/opengl/debug/imguirenderer.cpp:420:46: note: Assignment 'idx_buffer_offset=nullptr', assigned value is 0 qt3d-everywhere-src-5.15.19/src/plugins/renderers/opengl/debug/imguirenderer.cpp:430:21: note: Assuming condition is false qt3d-everywhere-src-5.15.19/src/plugins/renderers/opengl/debug/imguirenderer.cpp:438:31: note: Null pointer addition Explanation: `idx_buffer_offset` is set to `nullptr` at line 420. On the first inner-loop iteration, line 438 does `idx_buffer_offset += pcmd->ElemCount`, which is arithmetic on a null pointer. Adding a non-zero offset to a null pointer is undefined behavior in C/C++, even though this is the common OpenGL buffer-offset idiom. Before the PR, cppcheck treated the compound assignment `+=` as a plain write, so the null value was never seen as read. With the PR, `+=` is treated as a read, and the null pointer addition is detected. This matches the updated testnullpointer expectation. The warning is technically correct (a true positive, reported as inconclusive). The note 'Assuming condition is false' is not needed, because the addition happens on either branch, but it does not make the finding wrong. ---- 41 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qtads/qtads_3.4.0+dfsg.orig.tar.xz Result: your qtads-3.4.0/htmltads/tadshtml.cpp:76:13: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] qtads-3.4.0/htmltads/tadshtml.cpp:52:30: note: Assuming allocation function fails qtads-3.4.0/htmltads/tadshtml.cpp:52:16: note: Assignment 'buf_=(textchar_t*)malloc(bufalo_*sizeof(textchar_t))', assigned value is 0 qtads-3.4.0/htmltads/tadshtml.cpp:55:19: note: Assignment 'bufend_=buf_', assigned value is 0 qtads-3.4.0/htmltads/tadshtml.cpp:48:14: note: Assuming condition is true qtads-3.4.0/htmltads/tadshtml.cpp:76:13: note: Null pointer addition Explanation: If `th_malloc` (malloc) fails on line 52, `buf_` is NULL, so `bufend_ = buf_` is also NULL. Nothing checks for this, so `bufend_ += len` on line 76 does arithmetic on a NULL pointer. The new `nullPointerArithmeticOutOfMemory` warning is therefore a true positive for the out-of-memory path. Before the PR, the compound assignment wrongly counted as a plain write that killed the tracked value. The PR fixes this and updates its own test so that `p += a` on a null `p` now reports nullPointerArithmetic. The `memcpy` on line 73 would hit the NULL first, but the new warning still correctly flags missing allocation-failure handling. ---- 42 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-base/r-base_4.6.2.orig.tar.xz Result: your R-4.6.2/src/main/connections.c:5576:7: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] R-4.6.2/src/main/connections.c:5572:22: note: Assuming allocation function fails R-4.6.2/src/main/connections.c:5572:6: note: Assignment 'q=(char**)malloc(sizeof(char*))', assigned value is 0 R-4.6.2/src/main/connections.c:5569:16: note: Assuming condition is false R-4.6.2/src/main/connections.c:5576:7: note: Null pointer addition Explanation: In con_pushback, the code does `if(!q) error(...)` right after the malloc/realloc. R's `error()` (Rf_error) is a noreturn function, so `q` can never be NULL at `q += nexists`. On the malloc branch `nexists` is also <= 0, so the addition is effectively `+0`. The new nullPointerArithmeticOutOfMemory warning comes from the PR's changed handling of compound assignment, and it is a false positive. ---- 43 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-base/r-base_4.6.2.orig.tar.xz Result: your R-4.6.2/src/main/connections.c:5617:4: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] R-4.6.2/src/main/connections.c:5614:26: note: Assuming allocation function fails R-4.6.2/src/main/connections.c:5614:10: note: Assignment 'q=(char**)malloc(n*sizeof(char*))', assigned value is 0 R-4.6.2/src/main/connections.c:5611:13: note: Assuming condition is false R-4.6.2/src/main/connections.c:5617:4: note: Null pointer addition Explanation: At 5614 `q` is assigned from malloc, and line 5615 does `if(!q) error(...)`. R's `error()` (Rf_error) never returns, so `q` cannot be NULL when `q += nexists` runs at 5617. The new nullPointerArithmeticOutOfMemory warning ignores this guard and is a false positive. It appears because the PR now treats the compound assignment `q += nexists` as a read of `q` rather than a modification, so the stale null value from the allocation-failure path now reaches it. ---- 44 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/radare2/radare2_6.2.6+ds.orig.tar.xz Result: your radare2-6.2.6+ds/libr/bin/mangling/swift-sd.c:356:63: style: Parameter 'out' can be declared as pointer to const [constParameterPointer] Explanation: The new constParameterPointer warning says `out` in `get_mangled_tail()` could be `const RStrBuf *`. The shown lines (356–396) never use `out`. Whether the warning is right depends on how `out` is used later in the function, for example whether it is passed to non-const `r_strbuf_*` functions. That code is not shown. The PR changes how compound assignments count as modifications through pointers, but it is not clear how that affects `out` here. Without the rest of the function, I cannot tell whether this is a true or a false positive. ---- 45 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/rhash/rhash_1.4.6.orig.tar.gz Result: your rhash-1.4.6/file.c:177:44: style: Parameter 'file' can be declared as pointer to const [constParameterPointer] Explanation: `are_paths_equal` only reads `file->real_path`. It copies that into the local `fpath`, which is already a `ctpath_t` (pointer to const), and then only advances it with `fpath += 2` and `++fpath`. Moving a pointer this way does not change the pointed-to data. Before the PR, the compound assignment was treated as a write through the pointer, so the warning was suppressed. With the PR it is not. `file` really can be `const file_t*`, so this is a correct new true positive. ---- 46 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sacc/sacc_1.07.orig.tar.xz Result: your sacc-1.07/sacc.c:496:7: error:inconclusive: Pointer addition with NULL pointer. [nullPointerArithmetic] sacc-1.07/sacc.c:491:14: note: Assignment 'buf=NULL', assigned value is 0 sacc-1.07/sacc.c:496:7: note: Null pointer addition Explanation: `buf` is NULL only on the first loop iteration, when `n` is also 0, so `buf += n` adds 0 to NULL. On that same iteration `bs < 1` triggers the realloc, so `buf` is non-null on every later iteration where `n > 0`. Cppcheck's nullPointerArithmetic check deliberately skips arithmetic with 0, so this is a false positive. It appears because the PR now treats the compound assignment as a read, letting the NULL value reach line 496 without being tied to `n == 0`. The new inconclusive warning is noise. ---- 47 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/syrthes/syrthes_4.3.5+20200129-dfsg1.orig.tar.gz Result: main syrthes-4.3.5+20200129-dfsg1/src/syrthes-kernel/src/couplageSR.c:1507:3: error: Uninitialized variable: dist_moy [legacyUninitvar] Explanation: The same finding is still reported. The old unconditional legacyUninitvar error is replaced by a valueflow-based uninitvar warning with a path note ('Assuming condition is false' at line 1458). In non-MPI builds, dist_moy is only initialized inside the branch at line 1458. When that condition is false there is no else branch, so `dist_moy /= nbtot` at line 1507 reads an uninitialized value. This is a conditional issue, so reporting it as a warning with the path shown is more accurate than claiming a definite error. The PR's handling of compound assignment (`/=`) as a read in valueflow enables this. ---- 48 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/unifrac-tools/unifrac-tools_1.7.orig.tar.gz Result: your biocore-unifrac-binaries-f7ad9f7/src/api.cpp:2030:21: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] biocore-unifrac-binaries-f7ad9f7/src/api.cpp:2021:36: note: Assuming allocation function fails biocore-unifrac-binaries-f7ad9f7/src/api.cpp:2021:22: note: Assignment 'line_str=(char*)std::malloc(line_len)', assigned value is 0 biocore-unifrac-binaries-f7ad9f7/src/api.cpp:2018:21: note: Assuming condition is true biocore-unifrac-binaries-f7ad9f7/src/api.cpp:2025:26: note: str_tail_p is assigned 'line_str' here. biocore-unifrac-binaries-f7ad9f7/src/api.cpp:2030:21: note: Null pointer addition Explanation: `line_str` comes from `malloc(line_len)` at line 2021 and is never checked for NULL. It is copied to `str_tail_p`, and line 2030 does `str_tail_p += id_len`. If the allocation fails, that is pointer arithmetic on NULL, so the new nullPointerArithmeticOutOfMemory warning is a true positive. The PR now treats a compound assignment as a read of the old value before it is invalidated. That is why the NULL value is seen at `+=`, matching the updated testnullpointer expectation. ---- 49 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/u/unmo3/unmo3_0.6.orig.tar.gz Result: your unmo3-0.6/mo3_parse.c:140:65: style: Parameter 'mo3Hdr' can be declared as pointer to const [constParameterPointer] Explanation: In parseVoice() the parameter 'mo3Hdr' is never written through in the shown body; in fact it is not used at all. Only 'src'/'p' are read and advanced. Declaring it 'const struct mo3Data *' would compile and is semantically correct, so the new constParameterPointer warning is a true positive. It is unclear why this PR's changes to compound assignments and array access in isVariableChanged made it appear for an unused parameter. Possibly code not shown, such as a macro or another configuration, is involved, so confidence is low. ---- 50 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/welle.io/welle.io_2.7+ds.orig.tar.xz Result: your welle.io-2.7+ds/src/libs/mpg123/synth_8bit.h:54:30: error: Uninitialized variable: *tmp1 [uninitvar] welle.io-2.7+ds/src/libs/mpg123/synth_8bit.h:41:16: note: Assignment 'tmp1=samples_tmp', assigned value is welle.io-2.7+ds/src/libs/mpg123/synth_8bit.h:54:30: note: Uninitialized variable: *tmp1 Explanation: `samples_tmp` is filled indirectly. Its address is stored in `fr->buffer.data`, and `BASE_SYNTH_NAME(bandPtr, 0, fr, 0)` writes the synthesized samples into it before the loop reads `*tmp1`. So `*tmp1` is initialized and the new uninitvar error is a false positive. Before the PR, `tmp1 += 2` counted as a change to the pointer and ended tracking of the Uninit value. After the PR, a compound assignment no longer counts as a change at indirection 1, so the stale Uninit value survives. Cppcheck also misses the write through the alias. The result is a new false positive.