AI review of 2026-11-27_14-07-31-72c8fbddd3c3-results.txt PR: #9080 https://github.com/cppcheck-opensource/cppcheck/pull/9080 Tested: 72c8fbddd3c380c791ad9a1d1238aefcf92da920 Merge base: 35e76b57f7c689ec3e2a80df6e496aec53a2a48b Reviewed: 2026-11-27 19:20:51 UTC Model: claude-opus-5-5 (effort high) Results: 41 reviewed of 41 in the report Verdicts: 30 acceptable regression, 11 improvement Tokens: 166233 input, 48240 cache read, 1206 cache write, 36929 output The verdicts are written by AI and can be wrong. ---- 1 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/plugins/filesystem/ario-filesystem.c:135:39: style: Parameter 'source' can be declared as pointer to const. However it seems that 'ario_filesystem_get_name' is a callback function, if 'source' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/plugins/filesystem/ario-filesystem.c:164:34: note: You might need to cast the function pointer here ario-1.6/plugins/filesystem/ario-filesystem.c:135:39: note: Parameter 'source' can be declared as pointer to const Explanation: `ario_filesystem_get_name` never uses `source`; it only returns `_("File System")`. Declaring the parameter as `const ArioSource *` would therefore be valid. Since the function is a callback, a cast of the function pointer might be needed, and the warning already said so. The warning was a technically correct true positive. The PR stops skipping `isConstVarExpression` when `indirect != 0`. As a side effect, cppcheck now treats the pointee as possibly changed and drops this warning, along with the similar `get_name` and unused-parameter callback warnings in this package. Losing a correct, low-value style warning is a new false negative, not a false-positive fix. ---- 2 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/plugins/information/ario-information.c:101:40: style: Parameter 'source' can be declared as pointer to const. However it seems that 'ario_information_get_name' is a callback function, if 'source' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/plugins/information/ario-information.c:151:34: note: You might need to cast the function pointer here ario-1.6/plugins/information/ario-information.c:101:40: note: Parameter 'source' can be declared as pointer to const Explanation: In the visible source, `ario_information_get_name(ArioSource *source)` only returns `_("Information")` and never touches `source`, so declaring it pointer-to-const would be valid. The removed constParameterCallback warning therefore looks like a true positive, and losing it is a new false negative. The value of the warning is small: the function is a callback, so the user would have to cast the function pointer. The PR only stops `isConstVarExpression` from short-circuiting when `indirect != 0`, which makes the analysis more conservative. The same warning disappeared for every similar get_name callback in this package, which points to a systematic loss of detection rather than a fixed false positive. It is unclear why `source` is seen as used at all, since the sibling get_id/get_icon functions were never reported, so confidence is low. ---- 3 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/plugins/radios/ario-radio.c:168:34: style: Parameter 'source' can be declared as pointer to const. However it seems that 'ario_radio_get_name' is a callback function, if 'source' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/plugins/radios/ario-radio.c:191:34: note: You might need to cast the function pointer here ario-1.6/plugins/radios/ario-radio.c:168:34: note: Parameter 'source' can be declared as pointer to const Explanation: `ario_radio_get_name(ArioSource *source)` never uses `source`; it only returns `_("Web Radios")`. So the pointer could technically be pointer-to-const, and the constParameterCallback warning was a true positive by the check's own definition. The message already noted that the vfunc assignment would then need a cast. The PR makes `isVariableChanged` more conservative for indirect accesses, and that dropped this warning (and the similar ones in the package). This is a lost true positive, though a low-value one: it is a GObject vfunc with a fixed signature. The sibling functions `get_id` and `get_icon` were never flagged, which also suggests the original report came from odd analysis. ---- 4 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/covers/ario-cover-local.c:46:47: style: Parameter 'cover_provider' can be declared as pointer to const. However it seems that 'ario_cover_local_get_name' is a callback function, if 'cover_provider' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/covers/ario-cover-local.c:58:42: note: You might need to cast the function pointer here ario-1.6/src/covers/ario-cover-local.c:46:47: note: Parameter 'cover_provider' can be declared as pointer to const Explanation: `ario_cover_local_get_name` never uses `cover_provider`; it only returns a translated string. So the parameter really could be pointer to const, and main's constParameterCallback warning was technically correct. The warning has low practical value, because the function is assigned to the `get_name` vtable slot and changing the signature would need a function-pointer cast. The PR makes isVariableChanged more conservative: `isConstVarExpression` now short-circuits only when `indirect == 0`. That means more expressions are treated as possibly modified, which suppressed this warning. Losing a correct but low-value warning is a new false negative, not a removed false positive. ---- 5 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/playlist/ario-playlist-dynamic.c:67:51: style: Parameter 'playlist_mode' can be declared as pointer to const. However it seems that 'ario_playlist_dynamic_get_name' is a callback function, if 'playlist_mode' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/playlist/ario-playlist-dynamic.c:81:41: note: You might need to cast the function pointer here ario-1.6/src/playlist/ario-playlist-dynamic.c:67:51: note: Parameter 'playlist_mode' can be declared as pointer to const Explanation: `ario_playlist_dynamic_get_name` never uses `playlist_mode`; it only returns a translated string. The parameter could technically be `const ArioPlaylistMode *`, so main's constParameterCallback warning was a true (if low-value) positive. The function is assigned to a GObject vfunc slot (`playlist_mode_class->get_name`), so making the parameter const would need a function-pointer cast, which limits how useful the warning is. The PR only stops `isConstVarExpression` from short-circuiting when `indirect != 0`, and nothing in this code is modified through the pointer. So losing the warning is a side effect: a correct but minor diagnostic became a false negative. ---- 6 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/playlist/ario-playlist-normal.c:45:50: style: Parameter 'playlist_mode' can be declared as pointer to const. However it seems that 'ario_playlist_normal_get_name' is a callback function, if 'playlist_mode' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/playlist/ario-playlist-normal.c:59:41: note: You might need to cast the function pointer here ario-1.6/src/playlist/ario-playlist-normal.c:45:50: note: Parameter 'playlist_mode' can be declared as pointer to const Explanation: `ario_playlist_normal_get_name` never uses `playlist_mode` (it just returns `_("Normal")`), so it could technically be declared pointer-to-const. The main warning was therefore technically correct, and its removal is a lost true positive. The value is low: the function is a GObject vfunc callback, so making the parameter const would require casting the function pointer. The identical `get_id` function, which also ignores its parameter, was not warned even before the PR. The PR now applies `isConstVarExpression` only when `indirect == 0`; that loses this diagnostic as a side effect rather than fixing a false positive. ---- 7 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/playlist/ario-playlist-queue.c:47:49: style: Parameter 'playlist_mode' can be declared as pointer to const. However it seems that 'ario_playlist_queue_get_name' is a callback function, if 'playlist_mode' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/playlist/ario-playlist-queue.c:61:41: note: You might need to cast the function pointer here ario-1.6/src/playlist/ario-playlist-queue.c:47:49: note: Parameter 'playlist_mode' can be declared as pointer to const Explanation: In `ario_playlist_queue_get_name`, `playlist_mode` is never used; the function only returns `_("Queue Mode")`. So the parameter could technically be a pointer to const, and the removed constParameterCallback warning was a true positive. Its value is low, because the function is a GObject vtable callback and making the parameter const would require a function-pointer cast. The PR now skips `isConstVarExpression` whenever `indirect != 0`. That makes Cppcheck more conservative about pointer parameters, which suppresses this and the similar warnings in the package. The result is a lost, though minor, true positive rather than a fixed false positive. ---- 8 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/servers/ario-xmms.c:302:31: style: Parameter 'not_used' can be declared as pointer to const. However it seems that 'playlist_not' is a callback function, if 'not_used' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/servers/ario-xmms.c:511:9: note: You might need to cast the function pointer here ario-1.6/src/servers/ario-xmms.c:302:31: note: Parameter 'not_used' can be declared as pointer to const Explanation: `playlist_not` never uses `not_used`, so the parameter could technically be declared pointer-to-const, and the removed warning was a technically correct true positive. However, `playlist_not` is a callback whose signature is fixed by the xmms notifier type. Following the advice would mean casting the function pointer, so the warning had little practical value. The PR only changes `isVariableChanged` to skip the `isConstVarExpression` shortcut when indirect != 0. Losing this unused-parameter callback warning looks like a side effect of that change, not a correction of a false positive. So it is a new false negative of a low-value warning. ---- 9 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/servers/ario-xmms.c:303:25: style: Parameter 'xmms' can be declared as pointer to const. However it seems that 'playlist_not' is a callback function, if 'xmms' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/servers/ario-xmms.c:511:9: note: You might need to cast the function pointer here ario-1.6/src/servers/ario-xmms.c:303:25: note: Parameter 'xmms' can be declared as pointer to const Explanation: In `playlist_not`, the parameter `xmms` is never used; the body only calls `g_idle_add` with `NULL`. So the pointer could indeed be declared as pointer to const, and main's constParameterCallback warning was technically correct. The PR only changes `isVariableChanged` for indirect accesses, so this disappearance looks like a side effect rather than a fix for a false positive. The finding is low-value, since the parameter is unused in a callback with a fixed signature, but losing a correct warning is a new false negative. ---- 10 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/servers/ario-xmms.c:394:46: style: Parameter 'not_used' can be declared as pointer to const. However it seems that 'playback_volume_changed_not' is a callback function, if 'not_used' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/servers/ario-xmms.c:520:9: note: You might need to cast the function pointer here ario-1.6/src/servers/ario-xmms.c:394:46: note: Parameter 'not_used' can be declared as pointer to const Explanation: `not_used` is never referenced in `playback_volume_changed_not`; the body only calls `g_idle_add(..., NULL)`. Declaring it as a pointer to const is therefore technically valid, so the main warning was a true positive, if a low-value one. The PR targets a different false positive (`&v(1)` passed to `std::sort`). This warning, and all the other constParameterCallback warnings in this package, disappearing looks like a side effect of the `indirect == 0` guard in `isVariableChanged`. The code did not change, so this is a new false negative rather than a fixed false positive. ---- 11 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/servers/ario-xmms.c:395:40: style: Parameter 'xmms' can be declared as pointer to const. However it seems that 'playback_volume_changed_not' is a callback function, if 'xmms' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/servers/ario-xmms.c:520:9: note: You might need to cast the function pointer here ario-1.6/src/servers/ario-xmms.c:395:40: note: Parameter 'xmms' can be declared as pointer to const Explanation: `playback_volume_changed_not` never uses its `xmms` parameter; the body only calls `g_idle_add`. Declaring it `const ArioXmms *` would therefore be valid, so the removed constParameterCallback warning was technically a true positive. The PR stops skipping `isConstVarExpression` when `indirect != 0`. As a side effect, Cppcheck now treats these callback parameters as possibly modified, and every constParameterCallback warning in this package disappeared. That is a new false negative of a low-value style warning, not a removed false positive. ---- 12 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/sources/ario-browser.c:104:36: style: Parameter 'source' can be declared as pointer to const. However it seems that 'ario_browser_get_name' is a callback function, if 'source' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/sources/ario-browser.c:144:34: note: You might need to cast the function pointer here ario-1.6/src/sources/ario-browser.c:104:36: note: Parameter 'source' can be declared as pointer to const Explanation: `ario_browser_get_name` returns `_("Library")` and never uses `source`. Declaring it `const ArioSource *` would be valid, so the constParameterCallback warning was technically a true positive. The PR stops `isVariableChanged` from short-circuiting on const expressions when `indirect > 0`, so Cppcheck now treats the pointer as possibly modified. That suppresses the warning even though nothing modifies `source`, which makes this a lost true positive. It is a low-value one, though: the parameter is unused, and the sibling functions `get_id` and `get_icon` were never warned about. So this is an acceptable regression rather than a harmful one. ---- 13 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ario/ario_1.6.orig.tar.gz Result: main ario-1.6/src/widgets/ario-playlist.c:252:37: style: Parameter 'source' can be declared as pointer to const. However it seems that 'ario_playlist_get_name' is a callback function, if 'source' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ario-1.6/src/widgets/ario-playlist.c:275:34: note: You might need to cast the function pointer here ario-1.6/src/widgets/ario-playlist.c:252:37: note: Parameter 'source' can be declared as pointer to const Explanation: `ario_playlist_get_name(ArioSource *source)` only returns `_("Playlist")` and never reads or writes through `source`, so the pointee could be const. The old constParameterCallback warning was therefore technically a true positive, even if it is of low value: this is a GObject vtable callback, and changing the signature would need a function-pointer cast. The PR makes `isVariableChanged` skip the `isConstVarExpression` shortcut when `indirect > 0`, and that made Cppcheck drop this warning. The same thing happened to many identical callbacks in this package. Losing a correct, if low-value, warning is a new false negative, not a removed false positive. ---- 14 / 41 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/bin/elementary/quicklaunch.c:52:22: style: Parameter 'EINA_UNUSED' can be declared as pointer to const. However it seems that 'post_fork' is a callback function, if 'EINA_UNUSED' is declared with const you might also need to cast function pointer(s). [constParameterCallback] efl-1.29.0/src/bin/elementary/quicklaunch.c:173:42: note: You might need to cast the function pointer here efl-1.29.0/src/bin/elementary/quicklaunch.c:52:22: note: Parameter 'EINA_UNUSED' can be declared as pointer to const Explanation: `post_fork(void *data EINA_UNUSED)` is a callback whose parameter is unused. Because the `EINA_UNUSED` attribute macro was not expanded, Cppcheck misparsed the declaration and reported a parameter literally named 'EINA_UNUSED'. The message names a parameter that does not exist. The suggestion is also of little use: changing a callback's signature would require casting the function pointer at the registration site. The PR stops the const-var-expression shortcut from applying when indirect != 0, and as a side effect this bogus constParameterCallback warning on misparsed code is gone. Losing a misleading warning is a net benefit for users. ---- 15 / 41 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/examples/elementary/progressbar_example.c:141:28: style: Parameter 'EINA_UNUSED' can be declared as pointer to const. However it seems that '_on_done' is a callback function, if 'EINA_UNUSED' is declared with const you might also need to cast function pointer(s). [constParameterCallback] efl-1.29.0/src/examples/elementary/progressbar_example.c:159:58: note: You might need to cast the function pointer here efl-1.29.0/src/examples/elementary/progressbar_example.c:141:28: note: Parameter 'EINA_UNUSED' can be declared as pointer to const Explanation: Cppcheck did not expand the EINA_UNUSED macro, so it took the macro as the parameter name. The removed warning therefore names a parameter 'EINA_UNUSED' that does not exist. `_on_done` is an Evas smart callback registered via `evas_object_smart_callback_add`, so its signature is fixed by the API. Adding const would require casting the function pointer, which the user cannot reasonably do. The message was both misleading (wrong name) and of little practical value. Removing it removes noise or a false positive, which is an improvement. ---- 16 / 41 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/examples/elementary/progressbar_example.c:142:27: style: Parameter 'EINA_UNUSED' can be declared as pointer to const. However it seems that '_on_done' is a callback function, if 'EINA_UNUSED' is declared with const you might also need to cast function pointer(s). [constParameterCallback] efl-1.29.0/src/examples/elementary/progressbar_example.c:159:58: note: You might need to cast the function pointer here efl-1.29.0/src/examples/elementary/progressbar_example.c:142:27: note: Parameter 'EINA_UNUSED' can be declared as pointer to const Explanation: Main reported a constParameterCallback warning naming a parameter 'EINA_UNUSED'. That is a macro (an unused attribute) that Cppcheck failed to expand, so it was treated as the parameter name. The real parameter is 'obj', and it is unused inside a callback function. The message names a parameter that does not exist and has no value in a callback, so it is a false positive. The PR removes it. ---- 17 / 41 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/examples/elementary/progressbar_example.c:143:34: style: Parameter 'EINA_UNUSED' can be declared as pointer to const. However it seems that '_on_done' is a callback function, if 'EINA_UNUSED' is declared with const you might also need to cast function pointer(s). [constParameterCallback] efl-1.29.0/src/examples/elementary/progressbar_example.c:159:58: note: You might need to cast the function pointer here efl-1.29.0/src/examples/elementary/progressbar_example.c:143:34: note: Parameter 'EINA_UNUSED' can be declared as pointer to const Explanation: EINA_UNUSED is an unexpanded macro (__attribute__((unused))). Cppcheck therefore treats it as the parameter name, and the warning about a parameter named 'EINA_UNUSED' is nonsense. The real parameter 'event_info' is unused, and _on_done is a callback whose signature is fixed by evas_object_smart_callback_add, so suggesting const here has no value. Removing this bogus warning is an improvement. ---- 18 / 41 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/lib/ecore_con/efl_net_control-none.c:53:104: style: Parameter 'EINA_UNUSED' can be declared as pointer to const [constParameterPointer] Explanation: The warning names the parameter 'EINA_UNUSED' because the macro was not expanded; the real parameter is the unused `pd`. This is an EOLIAN method whose signature is fixed by the generated `.eo.c` function table, so suggesting a const pointer is not actionable and the message is misleading. Similar functions at lines 41 and 47 were not flagged, which suggests the warning depended on how the function is used in the generated code. Dropping this noisy false positive is an improvement, though how the PR's indirect check causes the removal is not fully clear. ---- 19 / 41 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/lib/ecore_con/efl_net_control-none.c:59:103: style: Parameter 'EINA_UNUSED' can be declared as pointer to const [constParameterPointer] Explanation: Line 59 is an EOLIAN method implementation. Its signature is fixed by the generated .eo.c code included at line 80. The 'pd' parameter is deliberately unused and marked with the EINA_UNUSED macro. Cppcheck did not expand that macro, so it treated 'EINA_UNUSED' as the parameter name, and the message names the wrong identifier. Making the parameter pointer to const would break the signature that the generated Eo function table expects. Not actionable, so the warning is noise or a false positive. It is reasonable to treat its disappearance as an improvement, though the exact reason the PR's change affects this case is not obvious from the source shown. ---- 20 / 41 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/lib/ecore_x/ecore_x_xi2.c:683:31: style: Parameter 'EINA_UNUSED' can be declared as pointer to const [constParameterPointer] Explanation: The removed warning is a false positive. Cppcheck misparsed the unexpanded `EINA_UNUSED` macro as the parameter name, so the message names a macro, not a real parameter. The actual parameter `data` is unused. The function is also a callback passed to `ecore_job_add`, which expects `void(*)(void*)`, so making the parameter const would break the callback signature. Removing this nonsensical suggestion helps users, although it is not obvious how the PR's change causes the removal. ---- 21 / 41 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/modules/ecore/system/tizen/ecore_system_tizen.c:66:54: style: Parameter 'EINA_UNUSED' can be declared as pointer to const. However it seems that '_low_batt_key_changed_cb' is a callback function, if 'EINA_UNUSED' is declared with const you might also need to cast function pointer(s). [constParameterCallback] efl-1.29.0/src/modules/ecore/system/tizen/ecore_system_tizen.c:192:65: note: You might need to cast the function pointer here efl-1.29.0/src/modules/ecore/system/tizen/ecore_system_tizen.c:66:54: note: Parameter 'EINA_UNUSED' can be declared as pointer to const Explanation: Cppcheck does not expand the `EINA_UNUSED` macro here. It therefore treats `EINA_UNUSED` as the parameter name, and both parameters of `_low_batt_key_changed_cb` end up with the same bogus name. The removed warning names a parameter that does not exist. It also targets an unused parameter of a callback whose signature (`keynode_t *, void *`) is fixed by the vconf API, so changing it to const is not practical. Dropping this misparse-based, noisy message is a small gain for users, although the removal looks like a side effect of the PR rather than better understanding of the code. ---- 22 / 41 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/modules/ecore/system/tizen/ecore_system_tizen.c:66:78: style: Parameter 'EINA_UNUSED' can be declared as pointer to const. However it seems that '_low_batt_key_changed_cb' is a callback function, if 'EINA_UNUSED' is declared with const you might also need to cast function pointer(s). [constParameterCallback] efl-1.29.0/src/modules/ecore/system/tizen/ecore_system_tizen.c:192:65: note: You might need to cast the function pointer here efl-1.29.0/src/modules/ecore/system/tizen/ecore_system_tizen.c:66:78: note: Parameter 'EINA_UNUSED' can be declared as pointer to const Explanation: Cppcheck did not expand the `EINA_UNUSED` macro, so it treated `EINA_UNUSED` as the name of both parameters of `_low_batt_key_changed_cb`. The function body never uses either parameter. It is also a callback registered through a function pointer, so making the parameter const would only force function-pointer casts. The removed warning names a nonexistent parameter and gives no actionable advice. Losing this noise is good for users, although the PR's change to `isVariableChanged` removes it somewhat incidentally rather than by better macro handling. ---- 23 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/e/efl/efl_1.29.0.orig.tar.xz Result: main efl-1.29.0/src/tests/eldbus/eldbus_test_eldbus_object.c:103:70: style: Parameter 'pending' can be declared as pointer to const. However it seems that '_peer_ping_cb' is a callback function, if 'pending' is declared with const you might also need to cast function pointer(s). [constParameterCallback] efl-1.29.0/src/tests/eldbus/eldbus_test_eldbus_object.c:361:60: note: You might need to cast the function pointer here efl-1.29.0/src/tests/eldbus/eldbus_test_eldbus_object.c:103:70: note: Parameter 'pending' can be declared as pointer to const Explanation: In `_peer_ping_cb`, the parameter `pending` is never used. Declaring it `const Eldbus_Pending *` would therefore be valid, so the removed constParameterCallback warning was technically a true positive. Its value is low: the function is a callback with a fixed `Eldbus_Message_Cb` signature, so following the advice would require a function-pointer cast. It is not obvious why the PR's change to `isVariableChanged` (indirect != 0) affects an unused parameter; it may be a side effect of how the EINA_UNUSED macro is handled. Losing a correct but marginal warning counts as an acceptable regression. ---- 24 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libb/libbde/libbde_20240502.orig.tar.gz Result: main libbde-20240502/pybde/pybde.c:100:22: style: Parameter 'arguments' can be declared as pointer to const. However it seems that 'pybde_get_version' is a callback function, if 'arguments' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libbde-20240502/pybde/pybde.c:57:18: note: You might need to cast the function pointer here libbde-20240502/pybde/pybde.c:100:22: note: Parameter 'arguments' can be declared as pointer to const Explanation: In pybde_get_version, 'self' and 'arguments' are never really used. PYBDE_UNREFERENCED_PARAMETER expands to nothing, or to a no-op on MSVC, so neither pointer is ever written through. The old constParameterCallback note was therefore technically correct, and the message already pointed out the callback cast issue. The PR stops isConstVarExpression from short-circuiting when indirect > 0. As a result, the unexpanded macro call PYBDE_UNREFERENCED_PARAMETER(arguments) is now treated as a possible modification through the pointer, and the warning disappears. This is a lost true positive, a new false negative. It has little practical value because changing the signature of a PyCFunction callback is rarely worthwhile. ---- 25 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libb/libbde/libbde_20240502.orig.tar.gz Result: main libbde-20240502/pybde/pybde.c:99:22: style: Parameter 'self' can be declared as pointer to const. However it seems that 'pybde_get_version' is a callback function, if 'self' is declared with const you might also need to cast function pointer(s). [constParameterCallback] libbde-20240502/pybde/pybde.c:57:18: note: You might need to cast the function pointer here libbde-20240502/pybde/pybde.c:99:22: note: Parameter 'self' can be declared as pointer to const Explanation: 'self' is never used or modified in pybde_get_version. It is only passed to PYBDE_UNREFERENCED_PARAMETER, which is typically a `(void)` cast or empty. So the constParameterCallback warning was technically correct. The warning already notes the function-pointer cast issue. The PR skips the isConstVarExpression shortcut when indirect != 0, which now apparently makes Cppcheck treat this use as a possible change through the pointer. That is a side effect, not better understanding. The removed warning is a low-value but true positive, so this is a new false negative. ---- 26 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/cheat_manager.c:1775:47: style: Parameter 'setting' can be declared as pointer to const [constParameterPointer] Explanation: In cheat_manager_copy_match, 'setting' is never used. Declaring it as pointer to const is technically valid, so main's warning was a true positive in the narrow sense. The PR only changes isVariableChanged for indirect > 0 const-var expressions, which this function body never touches. The removal therefore comes from usage elsewhere and looks like a side effect, not better understanding of this code. Note that the function is really a menu callback (action_ok-style signature), so the advice is of little practical value. Even so, a technically correct warning disappeared without a clear justification, making this a new false negative. ---- 27 / 41 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/cheat_manager.c:1783:49: style: Parameter 'setting' can be declared as pointer to const [constParameterPointer] Explanation: In `cheat_manager_delete_match`, the parameter `setting` is never used. The function has the standard RetroArch menu-action signature `(rarch_setting_t *, size_t, bool)` and is almost certainly assigned to an `action_ok`-style function pointer in another file. Making `setting` const would break that function-pointer type, so this warning is mostly noise. Its removal (and of the identical one at line 1775) is likely an improvement. The PR change (skip `isConstVarExpression` only when `indirect == 0`) does not obviously explain why a warning on an unused parameter disappears, hence low confidence. ---- 28 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/cheevos/cheevos.c:540:88: style: Parameter 'client' can be declared as pointer to const. However it seems that 'rcheevos_client_event_handler' is a callback function, if 'client' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/cheevos/cheevos.c:1588:59: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/cheevos/cheevos.c:540:88: note: Parameter 'client' can be declared as pointer to const Explanation: The visible part of `rcheevos_client_event_handler` only reads `event` and never touches `client`. Nothing shown modifies `client` or what it points to, so the removed constParameterCallback warning was most likely a true positive. The PR only skips the `isConstVarExpression` shortcut in `isVariableChanged` when `indirect != 0`. That targets cases like `&v(1)`, not this code. Yet it removed many similar const-pointer warnings across the package (unused or read-only callback parameters), which looks like a broad loss of true positives. The rest of the function (after line 580) is not shown, so a later write through `client` cannot be ruled out; hence low confidence. ---- 29 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/frontend/drivers/platform_dos.c:33:37: style: Parameter 'data' can be declared as pointer to const. However it seems that 'frontend_dos_init' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/frontend/drivers/platform_dos.c:162:2: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/frontend/drivers/platform_dos.c:33:37: note: Parameter 'data' can be declared as pointer to const Explanation: `frontend_dos_init(void *data)` never uses `data`, so declaring it `const void *` is technically valid, and the old constParameterCallback warning was a true positive. It is low-value, though: the signature is fixed by the frontend driver callback table at line 162, and the parameter is simply unused. The PR only stops `isConstVarExpression` from short-circuiting when `indirect != 0`, which makes Cppcheck more conservative about whether something is modified. Losing this warning is a side effect of that, not a fix of a false positive. That makes it a new false negative, so it counts as an acceptable regression. ---- 30 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/frontend/drivers/platform_psp.c:228:52: style: Parameter 'common' can be declared as pointer to const. However it seems that 'exit_callback' is a callback function, if 'common' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/frontend/drivers/platform_psp.c:237:56: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/frontend/drivers/platform_psp.c:228:52: note: Parameter 'common' can be declared as pointer to const Explanation: `exit_callback` never uses `common`, so the parameter could technically be `const void *`. The old constParameterCallback warning was a true, if low-value, positive: the function is a callback with a fixed signature, and the message already noted a cast would be needed. The PR now skips the `isConstVarExpression` shortcut when `indirect != 0`. As a side effect, the callback usage (passing `exit_callback` to the unknown `sceKernelCreateCallback`) appears to be treated as possibly modifying the parameter, so the warning disappears. That is a new false negative, not a removed false positive. ---- 31 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/input/drivers_joypad/psp_joypad.c:86:36: style: Parameter 'data' can be declared as pointer to const. However it seems that 'psp_joypad_init' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/input/drivers_joypad/psp_joypad.c:429:4: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/input/drivers_joypad/psp_joypad.c:86:36: note: Parameter 'data' can be declared as pointer to const Explanation: In `psp_joypad_init`, the parameter `data` is never used, so it is never modified. Declaring it `void const *` would be technically valid, which makes the constParameterCallback warning in main a true positive, if a low-value one for a callback signature. The PR only skips the `isConstVarExpression` shortcut when `indirect != 0`, and nothing in this code justifies dropping the warning. Many other correct const-pointer warnings in this package disappeared the same way. This looks like an unintended side effect, so it is a new false negative. ---- 32 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/input/drivers_joypad/xdk_joypad.c:57:36: style: Parameter 'data' can be declared as pointer to const. However it seems that 'xdk_joypad_init' is a callback function, if 'data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/input/drivers_joypad/xdk_joypad.c:316:4: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/input/drivers_joypad/xdk_joypad.c:57:36: note: Parameter 'data' can be declared as pointer to const Explanation: `xdk_joypad_init(void *data)` never uses `data`, so it could technically be `const void *`. The constParameterCallback warning was therefore technically correct, although acting on it would require casting the function pointer at line 316. The PR now skips the isConstVarExpression shortcut when indirect != 0, and that apparently suppresses this warning. Nothing changed in the code, and many similar callback-parameter warnings vanished across the package. This looks like a lost, low-value true positive (a new false negative) rather than a removed false positive. How the PR suppresses a warning for an unused parameter is not clear from the diff, hence low confidence. ---- 33 / 41 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/runloop.c:7560:48: style: Parameter 'task' can be declared as pointer to const [constParameterPointer] Explanation: In the HAVE_GFX_WIDGETS path, `task` is passed to `gfx_widgets_msg_queue_push(task, ...)`. In RetroArch that function takes a non-const `retro_task_t *` and keeps the pointer in the widget, so `task` cannot become pointer-to-const without changing that API. The PR stops `isConstVarExpression` from short-circuiting `isVariableChanged` when `indirect != 0`. Cppcheck therefore now sees that the pointee may be modified through the call, and the constParameterPointer false positive goes away. Confidence is medium because the callee's signature and the non-widget #else branch are not shown. ---- 34 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_content.c:2263:27: style: Parameter 'content_info' can be declared as pointer to const [constParameterPointer] Explanation: In `task_push_load_new_core`, `content_info` is never used in the function body under any preprocessor branch shown. Nothing writes through it, so it could be declared as pointer to const, and the main warning was a true positive. The PR only changes `isVariableChanged` for `indirect > 0`; it does not make this parameter actually modified. Many similar constParameter warnings disappear in this package as well, which suggests a side effect of the PR rather than a fix. Losing this warning is a new false negative. ---- 35 / 41 ---- Verdict: ACCEPTABLE REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_content.c:2266:13: style: Parameter 'user_data' can be declared as pointer to const [constParameterPointer] Explanation: In the code shown, `user_data` in `task_push_load_new_core` is never used, so declaring it as `const void *` would be valid and the old warning was a true positive. The PR only narrows when `isVariableChanged` treats const-var expressions as unchanged (now only when `indirect == 0`). That change makes Cppcheck more conservative and seems to suppress this and several similar warnings across the package. Losing this warning is a new false negative, not a removed false positive. It is unclear exactly why this unused parameter is affected, since other preprocessor configurations of the function may differ. ---- 36 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:657:21: style: Parameter 'task' can be declared as pointer to const. However it seems that 'cb_task_core_restore' is a callback function, if 'task' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:1080:29: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:657:21: note: Parameter 'task' can be declared as pointer to const Explanation: `cb_task_core_restore` never uses its `task` parameter; the body only calls `command_event` and `menu_contentless_cores_free`. So `task` could indeed be declared as pointer to const, and the old warning was technically correct. The message already noted that this is a callback, so applying it would need a function-pointer cast, which makes it low-value. The PR only changes `isVariableChanged` for indirect != 0 and does not make Cppcheck understand this code better. Dropping the warning is a lost true positive, i.e. a new false negative, which is an acceptable regression. ---- 37 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:657:33: style: Parameter 'task_data' can be declared as pointer to const. However it seems that 'cb_task_core_restore' is a callback function, if 'task_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:1080:29: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:657:33: note: Parameter 'task_data' can be declared as pointer to const Explanation: `cb_task_core_restore` never uses `task_data`. Only `command_event` and `menu_contentless_cores_free` are called. So declaring it `void const *` is technically valid, and the constParameterCallback warning (with its note about casting the function pointer at line 1080) was a true positive. The PR only changes `isVariableChanged` to skip the `isConstVarExpression` shortcut when `indirect > 0`. That change has nothing to do with an unused parameter. Its side effect suppresses this warning along with many similar ones in the package, including plain constParameterPointer cases. Losing the warning is a new false negative. The impact is small because this is a callback, where changing the signature is of little practical value. ---- 38 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:658:13: style: Parameter 'user_data' can be declared as pointer to const. However it seems that 'cb_task_core_restore' is a callback function, if 'user_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:1080:29: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/tasks/task_core_backup.c:658:13: note: Parameter 'user_data' can be declared as pointer to const Explanation: `cb_task_core_restore` never uses `user_data`, so the main warning was technically correct: the pointer could be declared `const void *`. The warning only says this would require casting the function pointer where the callback is registered. The PR adds `indirect == 0` to the `isConstVarExpression` shortcut in `isVariableChanged`. As a side effect, Cppcheck no longer reports this unused, unmodified parameter. That is a lost true positive (a new false negative), but a low-value one, since acting on it would mean casting the callback pointer. ---- 39 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:510:21: style: Parameter 'task' can be declared as pointer to const. However it seems that 'cb_task_core_updater_download' is a callback function, if 'task' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:1120:29: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:510:21: note: Parameter 'task' can be declared as pointer to const Explanation: `cb_task_core_updater_download` never uses or modifies `task`; the body only calls `command_event` and `menu_contentless_cores_free`. So `task` could be declared `const retro_task_t *`, and main's constParameterCallback warning was technically a true positive. The PR now skips the `isConstVarExpression` shortcut when `indirect != 0`, which makes cppcheck more conservative about pointer parameters and drops this valid, if low-value, style warning. That is a new false negative, not a removed false positive. ---- 40 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:510:33: style: Parameter 'task_data' can be declared as pointer to const. However it seems that 'cb_task_core_updater_download' is a callback function, if 'task_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:1120:29: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:510:33: note: Parameter 'task_data' can be declared as pointer to const Explanation: `cb_task_core_updater_download` never uses `task_data` (nor `task` or `user_data`). It only calls `command_event` and `menu_contentless_cores_free`. Under Cppcheck's rules the parameter could be declared `const void*`, so the constParameterCallback warning was technically correct. The PR only meant to stop the `isConstVarExpression` shortcut when `indirect != 0` (to fix the `std::sort(&v(1), &v(10))` false positive). Losing this warning on an unused callback parameter looks like an unintended side effect, so it is a new false negative. The warning had little practical value, because changing a callback signature would need a function-pointer cast, so the loss is minor. ---- 41 / 41 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/retroarch/retroarch_1.22.2+dfsg.orig.tar.xz Result: main RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:511:13: style: Parameter 'user_data' can be declared as pointer to const. However it seems that 'cb_task_core_updater_download' is a callback function, if 'user_data' is declared with const you might also need to cast function pointer(s). [constParameterCallback] RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:1120:29: note: You might need to cast the function pointer here RetroArch-1.22.2+dfsg/tasks/task_core_updater.c:511:13: note: Parameter 'user_data' can be declared as pointer to const Explanation: In `cb_task_core_updater_download`, `user_data` is never used. The body only calls `command_event` and `menu_contentless_cores_free`. Declaring it `void const *` would therefore be valid, so the removed `constParameterCallback` warning was technically a true positive. The value is low, because the parameter belongs to a fixed callback signature and changing it would require a function-pointer cast. The PR only skips the `isConstVarExpression` shortcut when `indirect != 0`, which makes `isVariableChanged` more conservative. That is a side effect here, not a fix for a real false positive, so losing this warning is a minor new false negative.