AI review of 2026-11-17_16-09-17-8fe6f7158526-results.txt PR: #9043 https://github.com/cppcheck-opensource/cppcheck/pull/9043 Tested: 8fe6f71585261ddff8e97062effe4c07b84882a0 Merge base: 05ff79126fdff887df5bebd848b1e89a6e469863 Reviewed: 2026-11-19 06:49:45 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 981 in the report (random sample) Verdicts: 9 acceptable regression, 35 improvement, 3 regression, 3 unclear Tokens: 133966 input, 301742 cache read, 6158 cache write, 40351 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/abiword/abiword_3.0.8+ds.orig.tar.xz Result: your AbiWord-release-3.0.8/src/text/fmt/xp/fp_Column.cpp:1267:13: style: Variable 'pLine2' can be declared as pointer to const [constVariablePointer] Explanation: In the visible code, 'pLine2' is only a static_cast of pContainer that is then used for isWrapped(), getNext() and canContainPoint(). These are probably const getters, so the warning could be a true positive. However, the function continues past the shown excerpt and further uses of pLine2 are not visible. The PR only changes value-flow alias handling for '->' dereferences, and it is not clear why that would make constVariablePointer fire here (and in about 40 other places in this package). A side effect, such as differently computed values changing what the checker sees, is possible. Without the rest of the function and the fp_Line method signatures, I cannot tell whether this is a newly found true positive or a false positive. ---- 2 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/a/aflplusplus/aflplusplus_5.03c.orig.tar.gz Result: main AFLplusplus-AFLplusplus-dbaf119/test/test-value-profile-slot-spill.c:103:29: style: Condition 'site_state->hit_count!=1U' is always true [knownConditionTrueFalse] AFLplusplus-AFLplusplus-dbaf119/test/test-value-profile-slot-spill.c:100:29: note: Assuming that condition 'site_state->hit_count!=0' is not redundant AFLplusplus-AFLplusplus-dbaf119/test/test-value-profile-slot-spill.c:101:32: note: Assuming condition is false AFLplusplus-AFLplusplus-dbaf119/test/test-value-profile-slot-spill.c:103:29: note: Condition 'site_state->hit_count!=1U' is always true Explanation: `site_state` points into `vp_local.site[site]`, and `run_once(1U)` is called between the check at line 100 and the one at line 103. `run_once` updates the hit count, so `site_state->hit_count != 1U` is not always true after the call. Main ignored that the call can change the object behind the pointer, so the warning was a false positive. The PR treats `->` access as a dereference and keeps the expression local only when the pointer provably points at a local object. That removes this false positive. ---- 3 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/astrometry.net/astrometry.net_0.98+dfsg.orig.tar.xz Result: main astrometry.net-0.98/util/test_endian.c:65:5: style: Variable 'ival' is assigned an expression that holds the same value. [redundantAssignment] astrometry.net-0.98/util/test_endian.c:39:10: note: ival is assigned '*itest' here. astrometry.net-0.98/util/test_endian.c:65:5: note: Variable 'ival' is assigned an expression that holds the same value. Explanation: `itest` points into a local array (`test32`) whose address does not escape. `ival = *itest` at line 39 is followed only by by-value use of `ival` (CuAssertIntEquals), printf, and calls on `&lval`, a different variable. Nothing can change `ival` or the local array before line 65. So `ival` already holds `*itest` there, and the redundantAssignment warning was a true positive, even if harmless style in test code. The PR now treats the deref through a local pointer as non-local, likely because it does not recognise that the pointer, cast from a local array, points to local memory. That drops the warning, which is a new false negative. ---- 4 / 50 ---- Verdict: ACCEPTABLE REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/bacula/bacula_15.0.3.orig.tar.gz Result: main bacula-15.0.3/src/win32/libwin32/statusDialog.cpp:106:17: style: Condition '*p=='\0'' is always false [knownConditionTrueFalse] bacula-15.0.3/src/win32/libwin32/statusDialog.cpp:91:14: note: Assuming that condition '*p=='\n'' is not redundant bacula-15.0.3/src/win32/libwin32/statusDialog.cpp:93:18: note: Assuming condition is false bacula-15.0.3/src/win32/libwin32/statusDialog.cpp:106:17: note: Condition '*p=='\0'' is always false Explanation: Inside `if (*p == '\n')` at line 91, `p` points into the caller's const `msg` buffer and is never modified. So `*p == '\0'` at line 106 is really always false, and the removed warning was a true positive (dead, redundant code). The PR now treats dereferences of any pointer that does not point at a known local object as non-local, so the `SendMessage` calls in between may in theory change `*p`. That is a deliberate, conservative trade-off, and losing this warning is a new false negative. ---- 5 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bibtool/bibtool_2.68+ds.orig.tar.xz Result: main bibtool-2.68+ds/rewrite.c:998:13: style: Condition '*hp' is always true [knownConditionTrueFalse] Explanation: `hp` is a local pointer into the record heap (`RecordHeap(rec)`). The loop checks `*hp && *(hp+1) && dont_keep(...) && dont_keep(...)`, and the body then tests `if (*hp)` again. Main reported that second test as always true. The PR now treats a dereference of any non-local-pointing pointer as non-local, so the intervening `dont_keep(..., rec, db)` calls are assumed to possibly change `*hp`. Cppcheck cannot see that from here, although `rec` is passed to `dont_keep`. `dont_keep` most likely only evaluates keep rules against the record and does not clear heap entries, so the redundant check is real and the warning was likely a true positive. Losing it is a deliberate, conservative trade-off of the PR, so this is an acceptable regression (a new false negative). ---- 6 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-djgpp/binutils-djgpp_2.35.1+dfsg.orig.tar.xz Result: main gnu/binutils-2.35.1/bfd/elf64-x86-64.c:4419:21: warning:inconclusive: Either the condition 'htab->elf.sgot==NULL' is redundant or there is possible null pointer dereference: htab->elf.sgot. [nullPointerRedundantCheck] gnu/binutils-2.35.1/bfd/elf64-x86-64.c:4415:26: note: Assuming that condition 'htab->elf.sgot==NULL' is not redundant gnu/binutils-2.35.1/bfd/elf64-x86-64.c:4419:21: note: Null pointer dereference Explanation: Line 4417 checks `htab->elf.sgot == NULL` and calls `abort()` if it is NULL. `abort()` does not return, so `htab->elf.sgot` cannot be NULL when it is dereferenced at lines 4420-4421. The removed inconclusive nullPointerRedundantCheck was therefore a false positive. The PR now treats `htab->...` as a non-local dereference, so the value from the condition is no longer carried forward, and the false positive goes away. ---- 7 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/b/binutils-m68hc1x/binutils-m68hc1x_2.35.1.orig.tar.xz Result: your binutils-2.35.1/bfd/elflink.c:3841:17: style: Variable 's' can be declared as pointer to const [constVariablePointer] Explanation: The marked line 3841 is a closing brace, but column 17 matches the 's' in the nearby declarations 'asection *s;' at lines 3817 and 3849, so the warning most likely refers to one of them. In both blocks 's' is only assigned from bfd_get_linker_section() and read once as 's->contents'. Copying the member pointer into a non-const 'bfd_byte *p' still works if 's' is 'const asection *', so the object 's' points to is never modified through 's'. The new constVariablePointer warning therefore looks like a valid true positive. Confidence is low because the line number does not match the shown source exactly and the PR's link to this check is not obvious. ---- 8 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/b/blockattack/blockattack_2.10.0.orig.tar.xz Result: main blockattack-game-2.10.0/source/code/Libs/imgui/imgui_widgets.cpp:10544:15: style: Variable 'window->DC.CursorMaxPos' is assigned an expression that holds the same value. [redundantAssignment] blockattack-game-2.10.0/source/code/Libs/imgui/imgui_widgets.cpp:10542:34: note: backup_cursor_max_pos is assigned 'window->DC.CursorMaxPos' here. blockattack-game-2.10.0/source/code/Libs/imgui/imgui_widgets.cpp:10544:15: note: Variable 'window->DC.CursorMaxPos' is assigned an expression that holds the same value. Explanation: `backup_cursor_max_pos` saves `window->DC.CursorMaxPos`. `ItemSize()` then changes the current window's `DC.CursorMaxPos` through ImGui's global context, and line 10544 restores the old value. `window` is a local pointer to a non-local object, so the call can change the member it points at. The restoring assignment is therefore not redundant, and main's redundantAssignment warning was a false positive. The PR now treats `->` member access through a non-local pointer as non-local, which removes this false positive. ---- 9 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/cmtk/cmtk_3.3.1p2+dfsg.orig.tar.xz Result: your cmtk-3.3.1p2/libs/Segmentation/cmtkEntropyMinimizationIntensityCorrectionFunctional.txx:445:27: style: Variable 'threadParameters' can be declared as pointer to const [constVariablePointer] Explanation: In this thread callback, `threadParameters` is only used to read the pointer member `thisObject` (lines 447–448). Reading a `Self*` member through a `const ThreadParameters*` still gives a `Self* const`, which can be assigned to `Self* This`. Declaring the variable as pointer to const therefore compiles and is correct, so the new constVariablePointer warning is a true positive. Its link to the valueflow change in the PR is indirect, but the warning itself looks right. ---- 10 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/compiz-plugins-main/compiz-plugins-main_0.8.18.orig.tar.xz Result: your compiz-plugins-main-0.8.18/src/ring/ring.c:1474:7: style: Variable 'rs' can be declared as pointer to const [constVariablePointer] Explanation: `RING_SCREEN(w->screen)` declares a local `RingScreen *rs`. In this block `rs` is only read (`rs->grabIndex`, `rs->selectedWindow`); it is never written through and never passed on. So declaring it as a pointer to const is valid, and the new constVariablePointer warning is technically a true positive. The similar uses at lines 1489 and 1503 also only read `rs`, which makes the new report consistent with them. The exact reason the PR's ValueFlow change exposed this warning is not obvious. The declaration also sits inside a macro, which makes the fix less convenient for users, so confidence is medium. ---- 11 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/d/dnssec-trigger/dnssec-trigger_0.17+repack.orig.tar.xz Result: main dnssec-trigger-0.17/riggerd/rbtree.c:473:26: style: Condition 'child_parent->right==child' is always true [knownConditionTrueFalse] dnssec-trigger-0.17/riggerd/rbtree.c:464:25: note: Assuming that condition 'child_parent->right==child' is not redundant dnssec-trigger-0.17/riggerd/rbtree.c:473:26: note: Condition 'child_parent->right==child' is always true Explanation: Line 464 already checks 'child_parent->right == child', so sibling is 'child_parent->left'. The only code between line 464 and line 473 is 'rbtree_rotate_left(rbtree, sibling)'. That rotation replaces sibling in its parent's slot, so it changes 'child_parent->left', not 'child_parent->right'. The re-check at line 473 is therefore really always true, and the old warning was a true positive about redundant code. The PR now treats 'child_parent->...' as a dereference of a non-local pointer that the function call might modify. That conservatively drops the warning, which is a new false negative rather than a fixed false positive. ---- 12 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: your efl-1.29.0/src/lib/evas/canvas/evas_layer.c:120:22: style: Variable 'e' can be declared as pointer to const [constVariablePointer] Explanation: In evas_layer_clean, the local pointer 'e' is only used to read e->layers (in the while condition and in 'tmp = e->layers'). It is never written through and never passed anywhere that needs a non-const pointer. Declaring it as 'const Evas_Public_Data *e' would compile, because efl_data_scope_get returns void*. So the new constVariablePointer warning is technically correct. It likely appears now because the PR's more conservative handling of '->' dereferences of non-local pointers changed the valueflow for the 'e->layers' loop condition, which no longer suppresses the const check. evas_layer_del does modify the list through another alias, but that does not stop 'e' from being a pointer to const. This is a new true positive. ---- 13 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/exiftags/exiftags_1.01.orig.tar.gz Result: main exiftags-1.01/timevary.c:108:4: warning: Either the condition '(*nextp=(struct vary*)malloc(sizeof(struct vary)))==NULL' is redundant or there is possible null pointer dereference: *nextp. [nullPointerRedundantCheck] exiftags-1.01/timevary.c:106:61: note: Assuming that condition '(*nextp=(struct vary*)malloc(sizeof(struct vary)))==NULL' is not redundant exiftags-1.01/timevary.c:108:4: note: Null pointer dereference Explanation: Line 106 checks the result of malloc for NULL and calls exifdie(), which in exiftags prints an error and calls exit(). So line 108 is only reached with a non-NULL *nextp, and the nullPointerRedundantCheck was a false positive. With the PR, dereferencing the local pointer 'nextp' counts as non-local unless it points to a known local object. nextp may point to v->next, which is reachable through an argument, so the call to exifdie() could change *nextp. The NULL value is therefore no longer carried past the call, and the false positive is gone. ---- 14 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/feedbackd/feedbackd_0.8.11.orig.tar.xz Result: your feedbackd-0.8.11/src/fbd-feedback-manager.c:272:11: style: Variable 'l' can be declared as pointer to const [constVariablePointer] Explanation: `l` is only used to walk the list: `l = events; l; l = l->next`, plus a read of `l->data` into `event`. Nothing is written through `l`. Declaring it `const GSList *l` compiles fine: `events` and `l->next` convert to a pointer to const, and `l->data` is still a plain `gpointer` when read from a const node. So the new constVariablePointer warning is a true positive. It probably appears because the PR changed how `->` dereferences of local pointers are analyzed. ---- 15 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/fluidsynth/fluidsynth_2.6.1+dfsg.orig.tar.xz Result: your FluidSynth-fluidsynth-71e85b2/src/bindings/fluid_cmd.c:2919:5: style: Variable 'handler' can be declared as pointer to const [constVariablePointer] Explanation: FLUID_ENTRY_COMMAND(data) declares 'fluid_cmd_handler_t* handler = (fluid_cmd_handler_t*)(data)'. In the visible part of fluid_handle_breathmode, 'handler' is only used to read 'handler->synth'. Reading a member through a pointer-to-const still gives a non-const 'fluid_synth_t*', so 'synth' can still be modified. Declaring 'handler' as 'const fluid_cmd_handler_t*' therefore looks valid, and the new constVariablePointer warning appears to be a true positive. It is not clear why the PR's ValueFlow change makes this warning appear. Confidence is medium because the rest of the function body is not shown. ---- 16 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/freeipmi/freeipmi_1.6.20.orig.tar.gz Result: main freeipmi-1.6.20/ipmiseld/ipmiseld-threadpool.c:88:26: style: Condition 'threadpool_data->exit_flag' is always false [knownConditionTrueFalse] freeipmi-1.6.20/ipmiseld/ipmiseld-threadpool.c:78:10: note: Assuming that condition '!threadpool_data->exit_flag' is not redundant freeipmi-1.6.20/ipmiseld/ipmiseld-threadpool.c:88:26: note: Condition 'threadpool_data->exit_flag' is always false Explanation: threadpool_data is a local pointer copied from the thread argument and points at shared memory. Other threads can change exit_flag while this thread is blocked in pthread_cond_wait or inside the lock/unlock calls. So the claim that 'threadpool_data->exit_flag' at line 88 is always false is a false positive. The PR treats '->' dereferences of pointers that do not point to known local objects as non-local, so the intervening function calls now invalidate the known value and the warning goes away. ---- 17 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gamescope/gamescope_3.11.49.orig.tar.gz Result: your Plagman-gamescope-dba8480/src/pipewire.cpp:134:20: style: Variable 'pw_buffer' can be declared as pointer to const [constVariablePointer] Explanation: In copy_buffer, `pw_buffer` is only read once, as `pw_buffer->buffer`, to initialize `spa_buffer`. Reading a pointer member through a pointer to const still yields a `struct spa_buffer *` value, so declaring `const struct pw_buffer *pw_buffer` would compile and is correct. The visible code (and, as far as I recall, the rest of this function in upstream gamescope) neither modifies `*pw_buffer` nor passes it to a non-const function. The new constVariablePointer warning therefore looks like a true positive. It is not obvious why this ValueFlow change made it appear, and the end of the function is not shown, hence medium confidence. ---- 18 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gbonds/gbonds_2.0.3.orig.tar.gz Result: your gbonds-2.0.3/src/recent-files/egg-recent-model.c:253:14: style: Variable 'tmp' can be declared as pointer to const [constVariablePointer] Explanation: In egg_recent_model_update_item, 'tmp' is only used to read 'tmp->data' and 'tmp->next'. The list nodes are never modified through it. Declaring it 'const GList *tmp' compiles fine: 'tmp->data' is a 'void * const' and can still be assigned to 'EggRecentItem *'. The function just above (egg_recent_model_add_new_groups) already uses 'const GList *tmp' in the same way. So the new constVariablePointer warning is a true positive. It is not obvious why the PR's valueflow change makes it appear, but the warning itself is correct. ---- 19 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gcr4/gcr4_4.4.1.orig.tar.xz Result: main gcr-4.4.1/egg/egg-asn1x.c:3235:3: style: Variable 'an' is assigned an expression that holds the same value. [redundantAssignment] gcr-4.4.1/egg/egg-asn1x.c:3220:5: note: an is assigned 'node->data' here. gcr-4.4.1/egg/egg-asn1x.c:3223:10: note: Assuming condition is false gcr-4.4.1/egg/egg-asn1x.c:3235:3: note: Variable 'an' is assigned an expression that holds the same value. Explanation: `an = node->data` at line 3220 is repeated at line 3235. In between, the code only calls atlv_new(), atlv_parse_der(raw, tlv) and atlv_free(tlv). None of these receive `node`, so `node->data` cannot realistically change, and the second assignment really is redundant. The warning was a true positive. The PR now treats `->` on a pointer argument as a non-local dereference, so the intervening function calls may modify `node->data`. That is the intended conservative behaviour to avoid knownConditionTrueFalse false positives (#12795). Losing this true positive is a new false negative, and an acceptable cost for that fix. ---- 20 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/giac/giac_2.0.0.21+dfsg2.orig.tar.xz Result: main giac-2.0.0/micropython-1.12/extmod/nimble/nimble/npl_os.c:239:28: style: Condition 'sem->count!=0' is always false [knownConditionTrueFalse] giac-2.0.0/micropython-1.12/extmod/nimble/nimble/npl_os.c:234:20: note: Assuming that condition 'sem->count==0' is not redundant giac-2.0.0/micropython-1.12/extmod/nimble/nimble/npl_os.c:239:28: note: Condition 'sem->count!=0' is always false Explanation: `sem` is a pointer argument. `nimble_uart_process()` is an external call that can change `sem->count` through another alias. This is the whole point of the loop: it waits for the semaphore to be released. So 'sem->count!=0 is always false' was a false positive. The PR treats dereferencing a pointer argument via '->' as non-local, which removes it. ---- 21 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gmerlin-avdecoder/gmerlin-avdecoder_2.0.0~svn6298~dfsg0.orig.tar.xz Result: your gmerlin-avdecoder-2.0.0~svn6298/lib/demux_matroska.c:131:22: style: Variable 'p' can be declared as pointer to const [constVariablePointer] Explanation: In init_vfw, 'p' is only read through. It copies p->CodecPrivate, which is most likely a 'uint8_t *' member (not checked here), into the local 'data' and reads p->CodecPrivateLen. Neither the struct nor the pointer member is modified through p. If p were declared 'const bgav_mkv_track_t *', p->CodecPrivate would have type 'uint8_t * const', which can still be assigned to 'uint8_t * data'. So the suggestion compiles and is a valid style finding. The PR's valueflow change most likely stopped an earlier false 'may be modified' result for p. This looks like a newly found true positive. ---- 22 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnome-desktop3/gnome-desktop3_3.38.5.orig.tar.xz Result: your gnome-desktop-3.38.5/libgnome-desktop/gnome-bg.c:1854:9: style: Variable 'list' can be declared as pointer to const [constVariablePointer] Explanation: In clear_cache, 'list' is only used to walk the list: 'list = bg->file_cache', 'list = list->next' and 'ent = list->data'. Nothing is written through it. Declaring it 'const GList *list' compiles in C: 'list->next' (GList*) converts implicitly to 'const GList*', and 'list->data' is 'void* const', which can still be assigned to 'FileCacheEntry*'. So the new constVariablePointer warning is a true positive. It is not obvious from the source why the PR's valueflow change made it appear. ---- 23 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gnss-sdr/gnss-sdr_0.0.22.orig.tar.gz Result: your gnss-sdr-0.0.22/src/core/libs/supl/types/constr_SET_OF.c:983:37: style: Variable 'specs' can be declared as pointer to const [constVariablePointer] Explanation: In SET_OF_free, 'specs' is assigned from '(asn_SET_OF_specifics_t *)td->specifics' and is only used once, to read 'specs->ctx_offset'. Nothing is written through it and it is not passed anywhere that needs a non-const pointer. It can therefore be declared 'const asn_SET_OF_specifics_t *specs'; the non-const cast result converts implicitly. The newly added constVariablePointer warning is a true positive. It is not clear from the diff why this value-flow change makes the warning appear, which is why confidence is medium. ---- 24 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/g/gpart/gpart_0.3.orig.tar.gz Result: your gpart-0.3/src/gm_qnx4.c:44:26: style: Parameter 'd' can be declared as pointer to const [constParameterPointer] Explanation: The PR only changes how ValueFlow decides whether a pointer dereference is local; it has nothing to do with const-correctness. So this new constParameterPointer warning is a side effect, and it is suspicious. qnx4_gfun is one of gpart's module callbacks; all of them take (disk_desc *, g_module *), and qnx4_init even checks d == 0 although it does not otherwise use d. These functions are most likely assigned to a g_module function pointer in another file, so changing the parameter to const would break that assignment. In the visible part, d is only read (d_sbuf, d_fd, d_ssize, d_nsb), but main did not warn and the rest of the function is not shown. The new warning is likely a false positive caused by the analysis change, but this cannot be confirmed from the code shown. ---- 25 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/g/grafx2/grafx2_2.9+ds.orig.tar.xz Result: your grafx2-2.9+ds/src/ifformat.c:258:5: warning: If memory allocation fails, then there is a possible null pointer dereference: buffer [nullPointerOutOfMemory] grafx2-2.9+ds/src/ifformat.c:2190:28: note: Assuming allocation function fails grafx2-2.9+ds/src/ifformat.c:2190:14: note: Assignment 'buffer=(byte*)malloc(line_size)', assigned value is 0 grafx2-2.9+ds/src/ifformat.c:2199:25: note: Calling function 'Set_IFF_color', 1st argument 'buffer' value is 0 grafx2-2.9+ds/src/ifformat.c:258:5: note: Null pointer dereference Explanation: The warning traces `buffer=(byte*)malloc(line_size)` at line 2190 being passed to `Set_IFF_color()` at line 2199. That function writes `buffer[address]` with no NULL check. If the save code really does not check the malloc result, which the trace suggests, this is a genuine out-of-memory null dereference, so a true positive. The PR treats dereferenced local pointers more conservatively. That probably stops a condition on the path from being treated as known, so the null path is now explored. The code at lines 2190-2199 is not shown, so I can't confirm there is no NULL check; hence the low confidence. ---- 26 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/ibm-3270/ibm-3270_4.3ga10.orig.tar.gz Result: main suite3270-4.3/x3270/CmplxMenu.c:589:18: style: Variable 'entry->rectangle.width' is assigned an expression that holds the same value. [redundantAssignment] suite3270-4.3/x3270/CmplxMenu.c:562:15: note: old_width is assigned 'entry->rectangle.width' here. suite3270-4.3/x3270/CmplxMenu.c:576:43: note: Assuming condition is false suite3270-4.3/x3270/CmplxMenu.c:589:18: note: Variable 'entry->rectangle.width' is assigned an expression that holds the same value. Explanation: `entry` is just a cast of the parameter `w`. `Layout(w, &reply->width, &reply->height)` is called between `old_width = entry->rectangle.width` and `entry->rectangle.width = old_width`, and Layout can change the widget's rectangle. The assignment at line 589 restores the old width, so it is not redundant and main's warning was a false positive. The PR now treats a member read through a pointer that does not point to a known local object as changeable by function calls, which removes this false positive. ---- 27 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-gpu-tools/intel-gpu-tools_2.6.orig.tar.xz Result: your igt-gpu-tools-2.6/tests/chamelium/kms_chamelium_audio.c:534:21: warning:inconclusive: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] igt-gpu-tools-2.6/tests/chamelium/kms_chamelium_audio.c:612:20: note: Assuming allocation function fails igt-gpu-tools-2.6/tests/chamelium/kms_chamelium_audio.c:612:20: note: Assignment 'channel=malloc(channel_len*sizeof(double))', assigned value is 0 igt-gpu-tools-2.6/tests/chamelium/kms_chamelium_audio.c:619:34: note: Calling function 'detect_flatline_amplitude', 1st argument 'channel' value is 0 igt-gpu-tools-2.6/tests/chamelium/kms_chamelium_audio.c:534:21: note: Null pointer dereference Explanation: At line 612 `channel` is assigned from `malloc()` and never checked for NULL. It is then passed at line 619 to `detect_flatline_amplitude()`, which reads `buf[i]` in its loop. If the allocation fails and `buf_len > 0`, that read dereferences a null pointer. This makes the new inconclusive nullPointerOutOfMemory warning a valid finding for this codebase, which never checks malloc results. The PR's better tracking of local allocations seems to let the null value from malloc reach the call where main lost it. Lines 612–619 are not shown, so how much the PR is responsible is somewhat uncertain. ---- 28 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/j/janet/janet_1.42.1.orig.tar.gz Result: your janet-1.42.1/src/core/pp.c:669:29: style: Variable 't' can be declared as pointer to const [constVariablePointer] Explanation: 't' is only used to read 't->proto'. Copying that member into a non-const 'JanetTable *proto' is still allowed when 't' is 'const JanetTable *', because the member pointer itself does not become pointer-to-const. So 't' can indeed be declared as pointer to const, and the new constVariablePointer warning is a true positive. It is not obvious how the ValueFlow change in this PR exposed it, which is why confidence is medium. ---- 29 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/j/jxrlib/jxrlib_1.2~git20261102.1ef17dd.orig.tar.xz Result: your jxrlib-1.2~git20261102.1ef17dd/image/decode/JXRTranscode.c:137:28: style: Variable 'pSCAlpha' can be declared as pointer to const [constVariablePointer] Explanation: In the code shown, `pSCAlpha` is only compared with NULL and used to read `pSCAlpha->m_param.uQPMode`. It is never written through, passed to a function, or has its address taken. Declaring it as `const CWMImageStrCodec *` is valid, since converting the non-const `m_pNextSC` to a pointer-to-const is fine in C. The new constVariablePointer warning therefore looks like a true positive. Confidence is medium because the end of the function (after line 177) is not shown. ---- 30 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/k/kaidan/kaidan_0.15.0.orig.tar.xz Result: your kaidan-0.15.0/src/AccountController.cpp:134:16: style: Variable 'account' can be declared as pointer to const [constVariablePointer] Explanation: The new warning says the loop variable `account` at line 134 could be `const auto *`. The only use of it is `account->connection()`. Whether that holds depends on whether `Account::connection()` is a const member function, and its declaration is not shown. The second loop at line 150 uses `account` the same way but is not flagged. The only difference is how the returned `connection` is used afterwards: here it is passed to `connect` and captured in a lambda, while at line 150 `connection->logOut(true)` is called. That suggests the warning comes from changed tracking of `connection`, which is a side effect of the PR's valueflow change rather than its intent. Without the `Account` class definition, I cannot tell whether this is a correct new finding or a false positive. ---- 31 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/klystrack/klystrack_0.20171212.orig.tar.gz Result: main klystrack-0.20171212/klystron/src/snd/music.c:1514:17: style: Variable 'muschn->note' is assigned an expression that holds the same value. [redundantAssignment] klystrack-0.20171212/klystron/src/snd/music.c:1512:26: note: oldnote is assigned 'muschn->note' here. klystrack-0.20171212/klystron/src/snd/music.c:1514:17: note: Variable 'muschn->note' is assigned an expression that holds the same value. Explanation: The code saves `muschn->note` in `oldnote`, then calls `mus_trigger_instrument_internal(mus, i, ...)`, and then restores the saved value. `muschn` points into `mus`'s channel array, not at a local object. So the call can change `muschn->note`, and the restore is intentional, not redundant. Main wrongly treated `muschn->note` as unaffected by the call. The PR now treats dereferences through non-local pointers via `->` as non-local, which removes this false positive. ---- 32 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/l/lxhotkey/lxhotkey_0.1.2.orig.tar.gz Result: your lxhotkey-0.1.2/plugins/gtk/edit.c:613:40: style: Parameter 'list' can be declared as pointer to const [constParameterPointer] Explanation: In add_options_to_tree(), 'list' is only read: 'list->data' is assigned to 'opt', 'list->next' is assigned back to 'list', and it is tested in the while condition. Nothing is written through the pointer and it is never passed to a function that takes a non-const GList*. Declaring it 'const GList *list' compiles in C: list->data is still a gpointer, and assigning list->next to a const GList* is fine. So the new constParameterPointer warning looks like a true positive. It is not obvious why this PR exposes it, which is why confidence is only medium, but the warning itself is correct. ---- 33 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libd/libdmtx/libdmtx_0.7.8.orig.tar.gz Result: main libdmtx-0.7.8/dmtxregion.c:569:7: style: Variable 'radians' is assigned an expression that holds the same value. [redundantAssignment] libdmtx-0.7.8/dmtxregion.c:550:12: note: radians is assigned 'reg->bottomAngle*(3.14159265358979323846/180)' here. libdmtx-0.7.8/dmtxregion.c:557:21: note: Assuming condition is false libdmtx-0.7.8/dmtxregion.c:569:7: note: Variable 'radians' is assigned an expression that holds the same value. Explanation: `reg` is a pointer parameter. Line 550 sets `radians = reg->bottomAngle * ...`. In the else branch at line 569, the same expression is assigned again. In between, only locals are written (`rBottom.*`, `rTop.p.*`), and the only call is `dmtxVector2Norm(&rBottom.v)`, a vector-norm function that would not touch `reg->bottomAngle`. So `radians` really does already hold that value, and main's warning was a true positive, even if the code is written that way for readability. The PR now treats `reg->` as a dereference of a non-local pointer and assumes the call might change the pointed-to object. That makes Cppcheck more conservative, and this correct warning is lost as a side effect of fixing #12795: a new false negative. ---- 34 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libg/libgpiv/libgpiv_0.6.1.orig.tar.gz Result: your libgpiv-0.6.1/lib/imgproc.c:1539:19: style: Variable 'A' can be declared as pointer to const [constVariablePointer] Explanation: `A` is set once with `A = (fftw_complex *) &a[0][0];`. In the code shown it is then only read, in `B[i][j][0] = A[ij][0] * scale` and `B[i][j][1] = A[ij][1] * scale`. The FFT writes go through `a` directly (`(fftw_complex *) &a[0][0]`), not through `A`. Nothing visible writes through `A`, passes it to a non-const parameter, or lets it escape, so declaring it `const fftw_complex *A` would be valid. The new warning looks like a true positive that main missed. Confidence is medium because the rest of the function after line 1579 is not shown. ---- 35 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libr/librecad/librecad_2.2.0.2.orig.tar.gz Result: main LibreCAD-2.2.0.2/librecad/src/main/qc_applicationwindow.cpp:1018:26: warning: Either the condition 'view' is redundant or there is possible null pointer dereference: m->getGraphicView(). [nullPointerRedundantCheck] LibreCAD-2.2.0.2/librecad/src/main/qc_applicationwindow.cpp:1033:13: note: Assuming that condition 'view' is not redundant LibreCAD-2.2.0.2/librecad/src/main/qc_applicationwindow.cpp:1032:49: note: Assignment to 'view=m->getGraphicView()' LibreCAD-2.2.0.2/librecad/src/main/qc_applicationwindow.cpp:1018:26: note: Null pointer dereference Explanation: Line 1018 dereferences `m->getGraphicView()` without a check. Lines 1032-1033 then fetch it again and test it for null. Lines 1050 and 1055 also dereference it without checking. In LibreCAD the graphic view of an MDI window is never null, so the `if (view)` check is redundant and the old warning pointed at a real inconsistency. The PR now treats `m->...` as a dereference of a non-local object. Calls in between, such as `slotPenChanged` and the `gridChanged` signal, may in theory change what `m` points at. So the value from line 1018 is no longer carried to line 1033. That reasoning is conservative and defensible, but here it drops a warning that was effectively a true positive (a redundant check). This is a new false negative, which counts as an acceptable regression. ---- 36 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libr/librttopo/librttopo_1.1.0.orig.tar.gz Result: your librttopo/src/rtt_tpsnap.c:410:13: style: Variable 'closest_segment_edge' can be declared as pointer to const [constVariablePointer] Explanation: In the code shown, 'closest_segment_edge' is only assigned from 'E' (RTLINE*, which converts implicitly to const RTLINE*), tested for NULL, and read through 'closest_segment_edge->points'. With 'const RTLINE*', that member has type 'RTPOINTARRAY* const', so it can still initialize the non-const 'RTPOINTARRAY *epa'. Nothing shown writes through the pointer or passes it to a function that takes a non-const RTLINE*. Declaring it pointer to const therefore looks valid, and the new warning is likely a true positive. Confidence is medium because the code after line 450 is not shown. ---- 37 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libw/libwfa2/libwfa2_2.3.6.orig.tar.gz Result: your WFA2-lib-2.3.6/wavefront/wavefront_components.c:383:24: style: Parameter 'wavefront' can be declared as pointer to const [constParameterPointer] Explanation: `wavefront_components_translate_idx` only reads fields of `*wavefront`: `offsets`, `bt_prev`, `lo` and `hi`. The writes go to `bt_prev[k]`, which is memory pointed to by a member, not the struct itself. With `const wavefront_t* const wavefront`, `wavefront->bt_prev` still has type `bt_block_idx_t*`, so the code compiles unchanged. The constParameterPointer suggestion is therefore valid, consistent with Cppcheck's usual semantics. Main probably missed it because of aliasing or valueflow imprecision that the PR changed. This is a new true positive, though it is not fully clear why the PR triggers it. ---- 38 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/m/mcl/mcl_22-282+ds.orig.tar.xz Result: main mcl-22-282/src/shcl/clmframe.c:1352:17: warning:inconclusive: Either the condition 'tnpivot->ascend_parent==NULL' is redundant or there is possible null pointer dereference: dummy_parent. [nullPointerRedundantCheck] mcl-22-282/src/shcl/clmframe.c:1345:40: note: Assuming that condition 'tnpivot->ascend_parent==NULL' is not redundant mcl-22-282/src/shcl/clmframe.c:1349:26: note: dummy_parent is assigned 'tnpivot->ascend_parent' here. mcl-22-282/src/shcl/clmframe.c:1352:17: note: Null pointer dereference Explanation: Line 1345 checks `tnpivot->ascend_parent == NULL` and then calls `mcxDie`, which terminates the program. The only way NULL survives that check is if `level >= n_clstack_g-1`, and the `level == n_clstack_g-1` case is already skipped by the `continue` at line 1341. So `dummy_parent` cannot be NULL at line 1352. The removed inconclusive nullPointerRedundantCheck was a false positive. The PR now treats `tnpivot->ascend_parent`, read through a non-local pointer, as possibly changed by intervening function calls, so the assumed NULL value is no longer carried forward. ---- 39 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/ndctl/ndctl_85.orig.tar.gz Result: your pmem-ndctl-b30f916/cxl/json_poison.c:25:25: style: Variable 'p_ctx' can be declared as pointer to const [constVariablePointer] Explanation: In the shown code, `p_ctx` is only used to read its members `jpoison`, `memdev` and `region`. Each is a pointer copied into a local variable, and reading a pointer member through a `const struct cxl_poison_ctx *` gives the same non-const pointer value. Nothing visible writes through `p_ctx` or passes it to a function, so it could be declared as pointer to const, and the new constVariablePointer warning looks like a true positive. The rest of the function is not shown, which leaves some uncertainty. It is also not obvious why this PR's ValueFlow change made the warning appear. ---- 40 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/n/netsniff-ng/netsniff-ng_0.6.9.orig.tar.xz Result: your netsniff-ng-0.6.9/proto_ethernet.c:52:17: style: Variable 'eth' can be declared as pointer to const [constVariablePointer] Explanation: The new warning says `eth` can be a pointer to const, but the code does `src_mac = eth->h_source; dst_mac = eth->h_dest;`, where `src_mac` and `dst_mac` are non-const `uint8_t*`. If `eth` were `const struct ethhdr*`, these array members would decay to `const uint8_t*`, and the assignments would discard the qualifier (a C constraint violation). So the warning is wrong unless other declarations are changed too. The identical pattern in `ethernet_less` (line 84) is not reported, which suggests the PR's value-flow change caused an inconsistent false positive. ---- 41 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/o/openafs/openafs_1.8.17~pre2.orig.tar.xz Result: your openafs_1.8.17~pre2.orig/src/afs/FBSD/osi_sleep.c:171:12: warning: Uninitialized variable: code [uninitvar] openafs_1.8.17~pre2.orig/src/afs/FBSD/osi_sleep.c:163:16: note: Assuming condition is false openafs_1.8.17~pre2.orig/src/afs/FBSD/osi_sleep.c:171:12: note: Uninitialized variable: code Explanation: `seq` is assigned from `evp->seq` on the line just before the `while (seq == evp->seq)` check, with no code in between. So the first check is always true, and the loop body always runs at least once, assigning `code` before line 171. The PR correctly stopped treating the condition as always true across loop iterations, since `msleep` may change `evp->seq`. But it now also treats the very first check as possibly false, and reports `code` as uninitialized on that path. That path cannot happen, so the new uninitvar warning is a false positive. ---- 42 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/pocl/pocl_7.1.orig.tar.gz Result: your pocl-pocl-0a2e04a/lib/CL/devices/level0/level0-driver.cc:1610:70: style: Parameter 'RunCmd' can be declared as pointer to const [constParameterPointer] Explanation: The visible part of setupKernelArgs only reads RunCmd->kernel and RunCmd->arguments. Copying those members into a non-const `cl_kernel` and a `pocl_argument*` would still compile if RunCmd were `const _cl_command_run*`, because constness does not carry over to what the pointer members point at. So far the new warning looks plausible. The function continues past line 1650, though, and the rest is not shown. Later code could take a non-const address of a RunCmd member or pass RunCmd to a non-const function, which would make the warning a false positive. The new warning appears only because of the PR's value-flow change for pointer dereferences, so it may also come from changed aliasing or lifetime information rather than better understanding. Without the rest of the function, its correctness cannot be confirmed. ---- 43 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/python-escript/python-escript_6.1.1.orig.tar.gz Result: main esys-escript.github.io-6.1.1/p4est/src/sc_notify.c:988:48: style: Condition 'pint[0]==psec[0]' is always true [knownConditionTrueFalse] esys-escript.github.io-6.1.1/p4est/src/sc_notify.c:982:24: note: Assuming that condition 'pint[0]>psec[0]' is not redundant esys-escript.github.io-6.1.1/p4est/src/sc_notify.c:978:19: note: Assuming that condition 'pint[0] psec[0]` are false, so `pint[0] == psec[0]` really is always true at line 988. Nothing between lines 978 and 988 can modify `*pint` or `*psec`. The warning was a technically correct true positive, though low-value because it sits inside a redundant SC_ASSERT. The PR now treats every dereference of a pointer as non-local, not just pointer arguments. `pint` and `psec` point into arrays that are not proven local, so the analysis becomes more conservative and drops this warning. That is a new false negative, not a removed false positive. ---- 44 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/rust-jemalloc-sys/rust-jemalloc-sys_0.3.2.orig.tar.gz Result: your jemalloc-sys-0.3.2/rep/src/ctl.c:786:64: style: Parameter 'ctl_arena' can be declared as pointer to const [constParameterPointer] Explanation: In ctl_arena_stats_sdmerge, 'ctl_arena' is only read: its fields (nthreads, pactive, pdirty, pmuzzy) are added into ctl_sdarena or checked in asserts, and 'ctl_arena->astats' is copied into a local pointer. Declaring the parameter 'const ctl_arena_t *' only makes the member 'astats' a 'ctl_arena_stats_t * const'. Copying it into a non-const 'ctl_arena_stats_t *' is still valid C, and modifying stats through that copy remains allowed. No visible code writes to *ctl_arena or passes it to a non-const function, so the suggestion appears correct. The new report is likely a true positive, assuming the unseen rest of the function also only accesses ctl_arena through astats. ---- 45 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/sqlitecpp/sqlitecpp_3.3.3.orig.tar.gz Result: your SQLiteCpp-3.3.3/sqlite3/sqlite3.c:72601:7: style: Variable 'pTmp' can be declared as pointer to const [constVariablePointer] Explanation: In allocateSpace, 'pTmp' is assigned '&data[hdr+5]' and then only read through the get2byte() macro ('top = get2byte(pTmp)'). In the shown code nothing is written through it. Later writes in upstream SQLite go through 'data' directly, e.g. 'put2byte(&data[hdr+5], top)', but that part of the function is not shown here. So 'pTmp' could be declared 'const u8*', and the new constVariablePointer warning looks like a valid true positive. It is unclear why the PR exposed it, but the message itself appears correct. ---- 46 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/supercollider/supercollider_3.14.1+repack2.orig.tar.xz Result: your SuperCollider-3.14.1-Source/server/plugins/ML_SpecStats.cpp:161:5: style: Variable 'world' can be declared as pointer to const [constVariablePointer] Explanation: Line 161 expands the `FFTAnalyser_GET_BUF` macro, which declares `World* world = unit->mWorld;`. `world` is only read: `world->mNumSndBufs` and `world->mSndBufs + ibufnum`. If `world` were `const World*`, `world->mSndBufs` would have type `SndBuf* const`, so `buf` could still be a non-const `SndBuf*` and be modified by `ToComplexApx`. `world` itself is never written through, so the warning looks like a true positive. It sits in a macro, so the fix belongs in the macro definition. It is not clear why this PR, aimed at knownConditionTrueFalse, exposes it. ---- 47 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/tpm2-tss/tpm2-tss_4.2.1.orig.tar.gz Result: main tpm2-tss-4.2.1/src/tss2-fapi/ifapi_helpers.c:1357:61: warning:inconclusive: Either the condition 'from_policy->element.PolicyPCR.pcrs==NULL' is redundant or there is possible null pointer dereference: from_policy->element.PolicyPCR.pcrs. [nullPointerRedundantCheck] tpm2-tss-4.2.1/src/tss2-fapi/ifapi_helpers.c:1351:49: note: Assuming that condition 'from_policy->element.PolicyPCR.pcrs==NULL' is not redundant tpm2-tss-4.2.1/src/tss2-fapi/ifapi_helpers.c:1357:61: note: Null pointer dereference Explanation: Line 1351 checks `pcrs == NULL` and then calls `goto_error(...)`. In tpm2-tss this macro sets `r` and jumps to the `error` label. So the dereference at line 1357 can only run when `pcrs` is non-NULL. The inconclusive nullPointerRedundantCheck was therefore a false positive. The PR changes how `->` dereferences of non-local pointers are tracked across function calls. That seems to make Cppcheck stop carrying the 'possibly NULL' assumption past the null-check branch, so the warning disappears. Removing this false positive is good for users. ---- 48 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vino/vino_3.22.0.orig.tar.xz Result: your vino-3.22.0/server/vino-server.c:1715:15: style: Variable 'l' can be declared as pointer to const [constVariablePointer] Explanation: `l` is only used to walk the list: it is assigned `server->priv->clients` and `l->next`, and it is read through `l->data`. None of these writes through the pointer. Declaring it `const GSList *l` compiles in C: `l->data` becomes `gpointer const`, which still converts to `VinoClient*`, and `l->next` is a `GSList*` assigned to a `const GSList*`. So the new constVariablePointer warning is a true positive. It is not clear exactly how the valueflow change exposed it, but the warning itself is correct. ---- 49 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/w/wireshark/wireshark_4.6.9.orig.tar.bz2 Result: main wireshark-v4.6.9/epan/dissectors/packet-opensafety.c:1291:72: style: Condition 'packet->payload.ssdo->sacmd.segmented' is always true [knownConditionTrueFalse] wireshark-v4.6.9/epan/dissectors/packet-opensafety.c:1276:45: note: Assuming that condition 'packet->payload.ssdo->sacmd.segmented' is not redundant wireshark-v4.6.9/epan/dissectors/packet-opensafety.c:1289:37: note: Assuming condition is true wireshark-v4.6.9/epan/dissectors/packet-opensafety.c:1291:72: note: Condition 'packet->payload.ssdo->sacmd.segmented' is always true Explanation: Line 1291 sits inside `if (packet->payload.ssdo->sacmd.segmented && packet->payload.ssdo->sacmd.initiate)`. Between that check and line 1291, the only calls are tvb_get_letohl and proto_tree_add_uint_format_value. Neither receives `packet` or `ssdo`, so in practice `segmented` cannot change, and the re-check at 1291 is genuinely redundant. The old warning was therefore a true positive. The PR now treats data read through a non-local pointer as possibly changed by any function call. That is a sound but conservative rule, and it suppresses this warning. The result is a lost true positive, a new false negative that the PR accepts as a trade-off. ---- 50 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/w/wise/wise_2.4.1.orig.tar.gz Result: your threestatemodel.dy:577:68: style: Parameter 'pro' can be declared as pointer to const [constParameterPointer] Explanation: The reported line and column do not match the .dy source shown, so the warning probably points into a generated file. Column 68 fits the signature 'ThreeStateModel * ThreeStateModel_from_half_bit_Sequence(Protein * pro, ...'. Column 75 of the companion warning fits the global variant at line 602. In the shown global variant, 'pro' is only null-checked and read via 'seq = pro->baseseq'. Copying a pointer member out of a const Protein is still allowed, so 'pro' could be declared 'const Protein *'. The local variant is presumably written the same way, which makes this new warning a likely true positive. The PR only changed value-flow aliasing, which plausibly removed a spurious 'may be modified' path. However, the function body at the reported location is not visible, so confidence is low.