AI review of 2026-11-17_03-33-10-fa536c64308e-results.txt PR: #8720 https://github.com/cppcheck-opensource/cppcheck/pull/8720 Tested: fa536c64308e36060e554a1c8629b07ed70526d2 Merge base: 530e59ff2e4a79db9da937ac6d8d60342c84d898 Reviewed: 2026-11-17 19:03:00 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 691 in the report (random sample), 4 not reviewed: valueFlowMaxIterations Verdicts: 3 acceptable regression, 22 improvement, 3 neutral, 21 regression, 1 unclear Tokens: 134339 input, 3157920 cache read, 789480 cache write, 49064 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/android-platform-art/android-platform-art_14.0.0+r15.orig.tar.xz Result: your libdexfile/dex/dex_file_verifier.cc:2038:72: style:inconclusive: Function 'CheckIntraSectionIterate < DexFile :: kDexTypeTypeIdItem >' argument 2 names different: declaration 'count' definition 'section_count'. [funcArgNamesDifferent] libdexfile/dex/dex_file_verifier.cc:306:57: note: Function 'CheckIntraSectionIterate < DexFile :: kDexTypeTypeIdItem >' argument 2 names different: declaration 'count' definition 'section_count'. libdexfile/dex/dex_file_verifier.cc:2038:72: note: Function 'CheckIntraSectionIterate < DexFile :: kDexTypeTypeIdItem >' argument 2 names different: declaration 'count' definition 'section_count'. Explanation: The member function template CheckIntraSectionIterate is declared in the class at line 306 with its second parameter named 'count'. The out-of-class definition at line 2038 names it 'section_count'. So the parameter names really do differ, and the funcArgNamesDifferent finding is a true positive. Main did not report it because the template instantiations were not linked to their declaration. With the PR the instantiations are linked, so the check now sees the mismatch. The drawback is noise: the same finding is repeated once per instantiation, 17 times in total. ---- 2 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/anfo/anfo_0.98.orig.tar.gz Result: your anfo-0.98/src/util.h:173:24: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: Line 173 defines the class template `delete_ptr` with a member `operator()`. The PR adds a new debug message here saying the SymbolDatabase could not resolve all user defined types. This is the kind of debug message the PR itself introduced: the template simplifier and symbol database now run in a loop, and the instantiation's types (probably the deduced or instantiated `delete_ptr<...>`) are no longer resolved after that update. Main did not report this, so Cppcheck now understands this code worse. The same new debug message also appears in anfo_common.h and misc_streams.h for this package. ---- 3 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/a/argus-clients/argus-clients_5.0.2+git20250321.41f65e2.orig.tar.xz Result: main argus-clients-5.0.2+git20250321.41f65e2/pythonlib/argusPython.c:813:11: portability:inconclusive: Casting from double * * to char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] Explanation: RaComparisonAlgorithms is an array of function pointers returning double. Main mistook its element type for 'double *', so it reported the cast to char* as a 'double * *' to 'char *' cast, a data representation problem. That is wrong: the array holds function pointers, and passing the array to bzero as char* is ordinary memset-style code. The PR adds a FUNCTION ValueType, so the declarator is now parsed as a pointer to function instead of a pointer to double. The invalidPointerCast check no longer fires, which removes a false positive. ---- 4 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bamtools/bamtools_2.5.3+dfsg.orig.tar.xz Result: main bamtools-2.5.3+dfsg/src/toolkit/bamtools_split.cpp:540:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable HasCustomTagPrefix [valueFlowBailoutIncompleteVar] Explanation: Line 540 is inside the member function template SplitListTagImpl. In main, valueFlow bailed out because `m_settings->HasCustomTagPrefix` was an incomplete variable, meaning the member access through m_settings was not resolved. With the PR, this function's bailout is instead reported at line 586 on `cerr`. That is a genuinely unknown library variable here, likely because the std library declarations are not available to Cppcheck. So Cppcheck now resolves the settings member, which shows it understands the instantiated template body better. The function is still skipped, but because of a different incomplete variable. Removing the bogus incomplete-variable bailout on HasCustomTagPrefix is a small improvement in understanding. ---- 5 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/b/bamtools/bamtools_2.5.3+dfsg.orig.tar.xz Result: your bamtools-2.5.3+dfsg/src/toolkit/bamtools_split.cpp:586:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable cerr [valueFlowBailoutIncompleteVar] Explanation: This is the same valueFlowConditionExpressions bailout for the same function, `SplitListTagImpl`. Main reported it at `HasCustomTagPrefix` (line 540); the PR reports it at `std::cerr` (line 586). The PR's template and symbol database changes now resolve the `m_settings->HasCustomTagPrefix` member, so the first incomplete variable found is the unresolved `std::cerr`. The function is still skipped by this ValueFlow pass, so users see no practical difference: only which incomplete variable triggers the debug message changed. ---- 6 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/clazy/clazy_1.17.1.orig.tar.xz Result: your clazy-v1.17.1/src/ClazyContext.h:152:43: performance:inconclusive: Function parameter 'loc' should be passed by const reference. [passedByValue] Explanation: In `isMainFile(clang::SourceLocation loc)` the parameter is reassigned (`loc = sm.getExpansionLoc(loc);`), so it cannot become a const reference. Also, `clang::SourceLocation` is a tiny trivially copyable wrapper around an integer, and passing it by value is idiomatic. The new passedByValue warning is therefore a false positive introduced by the PR. ---- 7 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/clazy/clazy_1.17.1.orig.tar.xz Result: your clazy-v1.17.1/src/checks/manuallevel/qproperty-type-mismatch.h:43:5: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, 'SymbolDatabase couldn't resolve all user defined types', at `struct Property`. That struct is a plain aggregate whose only external type is `clang::SourceLocation`. The source did not change, so the message comes from the PR's internal changes. Those changes move `createSymbolDatabaseNeedInitialization` into `finalize()` and add template deduction rounds that rebuild or incrementally update the symbol database. A new debug/bailout message without any gain in understanding of this code means Cppcheck handles it worse than before. ---- 8 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/codelite/codelite_17.0.0+dfsg.orig.tar.xz Result: your codelite-17.0.0/ctags/Units/parser-cxx.r/templates-in-labmdas-1.cpp.d/input.cpp:8:7: style: The member function 'Bar < int >::foo < int >' can be static. [functionStatic] codelite-17.0.0/ctags/Units/parser-cxx.r/templates-in-labmdas-1.cpp.d/input.cpp:8:7: note: The member function 'Bar < int >::foo < int >' can be static. codelite-17.0.0/ctags/Units/parser-cxx.r/templates-in-labmdas-1.cpp.d/input.cpp:8:7: note: The member function 'Bar < int >::foo < int >' can be static. Explanation: `Bar::foo()` only returns `A{}` and uses no member or `this`, so the member function could be static; the explicit call `b.template foo()` would still compile. The PR changed `addNamespace` to keep spaces inside class template instantiation names (`Bar < int >`). This most likely lets the out-of-line definition of the instantiation link to its in-class declaration, so the check now sees the body. That reflects better understanding of the code, and the warning is technically correct, if of minor value. ---- 9 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/c/crystal-dock/crystal-dock_2.16.orig.tar.gz Result: your dangvd-crystal-dock-7a34e96/src/display/plasma_virtual_desktop.h:108:10: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: The cast `(void (**)(void)) listener` converts a `const struct ..._listener *` into a non-const pointer to a function pointer. In C++ that is a reinterpret_cast combined with a const_cast between unrelated types, which is exactly what dangerousTypeCast is meant to flag. Before the PR the cast target had no ValueType, so the check could not see it. The new FUNCTION type gives `void(**)(void)` a type, so the check now fires. The type-punning really happens: the listener struct is accessed through a function-pointer array. That makes the warning technically correct, even though this is the standard wayland-scanner pattern in a generated header and some users will see it as noise. ---- 10 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/crystal-dock/crystal-dock_2.16.orig.tar.gz Result: your dangvd-crystal-dock-7a34e96/src/display/plasma_window_management.h:268:10: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: Line 268 is a C-style cast of `listener`, a `const struct org_kde_plasma_window_management_listener *`, to `void (**)(void)`. This is the usual wayland-scanner idiom, but in C++ it is really a reinterpret_cast between unrelated pointer types: a pointer to a struct becomes a pointer to a function pointer, and it also casts away const. Before the PR, Cppcheck had no ValueType for function pointer types, so it could not judge this cast. With the new FUNCTION type it sees the conversion between unrelated pointer types, which is exactly what dangerousTypeCast is meant to report. The warning is technically correct for C++ code, even though it is in generated code and the idiom is common. ---- 11 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/crystal-dock/crystal-dock_2.16.orig.tar.gz Result: your dangvd-crystal-dock-7a34e96/src/display/plasma_window_management.h:596:10: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: The line casts `listener`, a `const struct org_kde_plasma_window_listener *`, to `void (**)(void)`, a pointer to a function pointer. This is a reinterpret-style conversion: it treats a struct of function pointers as an array of function pointers. It also drops const. Before this PR the cast target had no ValueType, so the check could not judge the cast. The PR adds the FUNCTION ValueType, which gives the cast a type, so dangerousTypeCast now sees a struct pointer converted to an unrelated pointer type. It would flag `(int*)listener` in the same way. The pattern is the usual libwayland generated-header idiom and works in practice. Still, the warning text (a potentially invalid conversion that should be a C++ cast) is accurate, and the new report comes from Cppcheck understanding the type better. ---- 12 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/crystal-dock/crystal-dock_2.16.orig.tar.gz Result: your dangvd-crystal-dock-7a34e96/src/display/plasma_window_management.h:983:10: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: Line 983 casts `const struct org_kde_plasma_activation_feedback_listener *` to `void (**)(void)` with an old-style C cast in C++ code. Before the PR, Cppcheck gave the cast type `void (**)(void)` no ValueType, so dangerousTypeCast could not judge it. The PR adds a FUNCTION ValueType for pointers to functions, so the check now sees a cast from a struct pointer to a pointer to a function pointer. That is an unrelated-type reinterpretation, which is what this check targets: it would need a reinterpret_cast, and it also drops the const. The code is the usual generated Wayland idiom and works in practice, but the warning is technically correct and consistent with what the check is meant to report. So this is a new true positive caused by better type understanding. ---- 13 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/c/crystal-dock/crystal-dock_2.16.orig.tar.gz Result: your dangvd-crystal-dock-7a34e96/src/display/wlr_foreign_toplevel_management.h:351:10: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: Line 351 casts `const struct zwlr_foreign_toplevel_handle_v1_listener *` to `void (**)(void)` with a C-style cast. The PR gives function-pointer types a real ValueType (FUNCTION), so Cppcheck can now see the target type of this cast. In C++ this cast acts as a reinterpret_cast between unrelated types: a pointer to a struct becomes a pointer to a function pointer. It also drops const. That is exactly what dangerousTypeCast is meant to report. This is the usual Wayland-generated idiom and works in practice, but it is a genuine type-punning cast, so the new warning is a true positive the checker previously missed. ---- 14 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/d/dawn/dawn_0.0~git20260909.1a75cb7f.orig.tar.xz Result: main dawn-0.0~git20260909.1a75cb7f/third_party/spirv-tools/src/source/opt/ir_builder.h:431:20: style: Unsigned expression 'value' can't be negative so it is unnecessary to test it. [unsignedPositive] Explanation: `GetIntConstant` is a template. Its assert `value >= 0` is generic code: it is meaningful when T is signed (e.g. int32_t) and only redundant for the uint32_t instantiation. Warning that the test is unnecessary in a template body is a false positive. The PR adds a check in `testIfNonZeroExpressionIsPositive` that bails out when the variable's type is a template argument, so removing this unsignedPositive warning is an improvement. ---- 15 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/fastcdr/fastcdr_2.3.6.orig.tar.gz Result: your eProsima-Fast-CDR-d721939/test/cdr/SimpleTest.cpp:169:9: warning:inconclusive: Possible null pointer dereference: array1 [nullPointer] eProsima-Fast-CDR-d721939/test/cdr/SimpleTest.cpp:6503:32: note: Assignment 'wchar_seq_value=NULL', assigned value is 0 eProsima-Fast-CDR-d721939/test/cdr/SimpleTest.cpp:6634:21: note: Calling function 'EXPECT_ARRAY_EQ < wchar_t >', 1st argument 'wchar_seq_value' value is 0 eProsima-Fast-CDR-d721939/test/cdr/SimpleTest.cpp:169:9: note: Null pointer dereference Explanation: wchar_seq_value is initialized to NULL and later passed to the test's deserialization code (deserializeSequence takes a pointer reference and allocates the buffer) before EXPECT_ARRAY_EQ is called. So the pointer is most likely non-null at line 169. The deserialization code is not shown, so this is inferred, but the 'inconclusive' tag shows Cppcheck itself is unsure. Main already gave the same warning for octet_seq_value. Now that the PR instantiates EXPECT_ARRAY_EQ (and the other element types) separately, the same likely false positive is repeated for each instantiation. This adds a new probable false positive rather than finding a real bug. ---- 16 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/fastnetmon/fastnetmon_1.2.9.orig.tar.gz Result: your pavel-odintsov-fastnetmon-394fbe0/src/fmt/format.h:1757:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Char [valueFlowBailoutIncompleteVar] Explanation: The new message is a debug bailout (valueFlowBailoutIncompleteVar) on the generic body of the `find_escape` template. In that body `Char` is still an unresolved template parameter, so ValueFlow skips the function. Previously the template was instantiated through `find_escape(...)` and the generic declaration was removed. With this PR the generic definition stays in the token list: the deferred-removal and `hasRemainingCalls` logic keeps it because undeduced calls like `find_escape(begin, end)` remain in other templates. Cppcheck therefore now processes uninstantiated template code and emits a new bailout. Nothing is gained for users, and this indicates less complete understanding of the code at this location. ---- 17 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/f/furnace/furnace_0.6.8.3+git20261108+ds.orig.tar.xz Result: your furnace-0.6.8.3+git20261108+ds/src/gui/newSettings.cpp:158:47: style: Variable 'data' can be declared as pointer to const [constVariablePointer] Explanation: In this case block `data` is only read: `data->minV`, `data->maxV` and `data->fmt` are passed to `CWSliderFloat` and to `setValue(...)`. The call `setValue(data->minV)` uses a member template without explicit template arguments. Main could not instantiate it and so could not tell whether the argument might be modified, which kept the warning back. With deduction, `setValue` is instantiated, most likely taking its value by value or const reference, and cppcheck sees no write through `data`. The pointer can therefore be declared pointer-to-const, so the new `constVariablePointer` warning is a true positive. ---- 18 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/iwyu/iwyu_8.26.orig.tar.gz Result: your include-what-you-use-0.26/vendor/googletest/src/gtest-printers.cc:268:34: style: Condition '1<=c' is always true [knownConditionTrueFalse] include-what-you-use-0.26/vendor/googletest/src/gtest-printers.cc:262:9: note: Assuming that condition 'c==0' is not redundant include-what-you-use-0.26/vendor/googletest/src/gtest-printers.cc:268:34: note: Condition '1<=c' is always true Explanation: `PrintCharAndCodeTo` is a generic template used with `unsigned char`, `signed char` and `wchar_t`. The new deduction instantiates it for `unsigned char`, where `c == 0` returning first makes `1 <= c` always true. For `signed char` (and the signed `wchar_t` on Linux), `c` can be negative, so the check is needed in the shared template source. Reporting it as always true is a false positive the user cannot fix. ---- 19 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kdesvn/kdesvn_2.1.0.orig.tar.xz Result: main kdesvn-2.1.0/src/svnfrontend/svnactions.cpp:2535:18: style:inconclusive: Either there is a missing 'override', or the member function 'SvnActions::getaddedItems' can be const. [functionConst] kdesvn-2.1.0/src/svnfrontend/svnactions.h:158:10: note: Either there is a missing 'override', or the member function 'SvnActions::getaddedItems' can be const. kdesvn-2.1.0/src/svnfrontend/svnactions.cpp:2535:18: note: Either there is a missing 'override', or the member function 'SvnActions::getaddedItems' can be const. Explanation: `getaddedItems` only changes state through `m_Data->m_UpdateCache.listsubs_if(...)`. `m_Data` is a pointer-like member, and its constness is shallow, so the method can legally be declared const. Sibling methods such as `checkModifiedCache`, which also go through `m_Data->...`, are already const. The removed inconclusive functionConst warning was therefore a valid suggestion. It likely disappeared because the PR now deduces and instantiates the member template call `listsubs_if(path, vro)`, so Cppcheck resolves it to a non-const member function and treats the method as modifying. Losing this true positive is a new false negative, not a fixed false positive. ---- 20 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/l/lincity-ng/lincity-ng_2.15.0.orig.tar.gz Result: your lincity-ng-lincity-ng-2.15.0/src/lincity/xmlloadsave.cpp:979:21: style: Variable 'cst' can be declared as pointer to const [constVariablePointer] Explanation: Inside the loop, `cst` is only used for reads: `cst->isDead()`, `cst->constructionGroup->group`, `cst->point.x/y`, and `cst->save(xmlWriter)`. In lincity-ng the latter is a const save method, as far as I recall; the header is not shown, so this is not verified. Before the PR, the calls `f(cst->...)` to the function template `f` were not instantiated, so Cppcheck had to assume the arguments might be modified. With type deduction, `f` is now instantiated with by-value parameters, so Cppcheck sees that nothing modifies `*cst`. Cppcheck normally stays silent when a non-const member is called, so the warning is most likely a correct new true positive: `const Construction *cst` would compile. ---- 21 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/oce/oce_0.18.3.orig.tar.gz Result: main oce-OCE-0.18.3/test/gtest-1.7.0/test/gtest-printers_test.cc:979:8: style: struct member 'const_iterator::x' is never used. [unusedStructMember] Explanation: `const_iterator` is a one-member aggregate that exists only so it can be passed to the `Print(it)` template. `Print` dumps the object's raw bytes (the test expects "1-byte object <00>"), so `x` is effectively read through the whole object even though it is never named. With the PR, `Print(it)` is instantiated with the deduced type `const_iterator`. Cppcheck now sees the struct object passed whole into a function, so it no longer claims the member is unused. The same change removed the matching warning for `iterator::x`. The removed warning was effectively a false positive. ---- 22 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/paraview/paraview_6.1.1+dfsg1.orig.tar.gz Result: your Plugins/GenericIOReader/Readers/LANL/GIO/GenericIO.cxx:1557:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Name [valueFlowBailoutIncompleteVar] Explanation: The new line is a debug bailout inside the member function template `GenericIO::readDataSection`. The condition `VName != Vars[i].Name` uses `Name`, a member of the class's `Vars` element type. Main resolves it; with the PR, Cppcheck treats `Name` as an incomplete variable and skips value-flow condition analysis for the whole function. In the same file, main's constVariablePointer results for `RH`/`BH` are gone and similar new bailouts appear. This suggests the PR's changes to template processing (deferred or kept template declarations, incremental symbol-database updates) leave member references unresolved in this code. A new bailout caused by worse symbol resolution is a regression. ---- 23 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/paraview/paraview_6.1.1+dfsg1.orig.tar.gz Result: your Utilities/VisItBridge/Library/VisItLib/common/state/Variant.C:55:26: portability:inconclusive: Casting from float * to unsigned char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] Explanation: Main never analyzed the body of `EncodeToString` with a concrete `T`, because the calls pass variables rather than literals. The PR now deduces `T=float` from those calls and instantiates `EncodeToString`. In that instantiation, `(unsigned char *)&val` really is a cast from `float*` to `unsigned char*`. Cppcheck already reports such char casts as inconclusive `invalidPointerCast` in non-template code. The warning also fits this code: it serializes the raw bytes of a float into a string that is decoded elsewhere, which depends on the float binary representation. The deduction is correct and the warning matches what Cppcheck says for the equivalent non-template code. The byte access itself is legal and intended, which is why the warning is only inconclusive. ---- 24 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/plasma-framework/plasma-framework_5.116.0.orig.tar.xz Result: your plasma-framework-5.116.0/src/declarativeimports/calendar/eventdatadecorator.h:16:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The header declares a member `CalendarEvents::EventData m_data;` whose type comes from an external header that was not available. The type was unresolvable before and after the PR. Main did not report this debug message; the PR does. The PR moves `createSymbolDatabaseNeedInitialization()` (which emits this debug message for classes with unknown member types) into the new `finalize()` step, which runs later. It also adds the template-deduction rounds that may rebuild the database. Nothing in this code involves function template deduction, so Cppcheck does not understand the class any better. The new debug output is a side effect of the reordering, not a sign of better understanding, so it is a small regression in debug noise. ---- 25 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/psi/psi_1.5+dfsg1.orig.tar.xz Result: main psi-1.5/src/tools/crash/crash_sigsegv.cpp:142:20: style: C-style pointer casting [cstyleCast] Explanation: Line 142 uses C-style casts to convert `print` and `printf` to `int(*)(const char*, ...)`. The removed cstyleCast style message was a correct report of a C-style cast in a C++ file. It was not truly dropped: the PR now gives pointers to functions the new FUNCTION value type, and the same cast is reported as a dangerousTypeCast warning instead. `printf` already has this signature, and `print` most likely does too, so the casts are effectively no-ops. Calling them a 'potentially invalid type conversion' at warning severity is less accurate than the old style message, so this message change looks like a regression. ---- 26 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/psi/psi_1.5+dfsg1.orig.tar.xz Result: your psi-1.5/src/avcall/jinglertptasks.h:166:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: Only the PR build reports the debug message 'SymbolDatabase couldn't resolve all user defined types' at the class JT_JingleRtp definition. The code is unchanged and ordinary: a class derived from XMPP::Task with Qt members. The same new message also shows up in several other psi files. That points to the PR's new template deduction rounds and incremental symbol database rebuild leaving some types unresolved, which main resolved without complaint. A new debug message like this means Cppcheck understands the code worse. ---- 27 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/psi/psi_1.5+dfsg1.orig.tar.xz Result: your psi-1.5/src/discodlg.cpp:750:2: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: With the PR, a new debug message 'SymbolDatabase couldn't resolve all user defined types' appears at the nested class DiscoDlg::Private::History. The code is ordinary: a nested helper class that uses XMPP::Jid and QString. Main resolved it without this message. The PR's incremental symbol database update or rebuild after template deduction rounds evidently leaves some type pointers unresolved. Similar new debug messages show up in several other files of this package. A new debug message means Cppcheck understands the code worse. ---- 28 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/psi/psi_1.5+dfsg1.orig.tar.xz Result: your psi-1.5/src/psievent.h:247:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, 'SymbolDatabase couldn't resolve all user defined types', at the declaration of `class FileEvent : public PsiEvent`. Main did not report it. The code is an ordinary Qt class with a base class, members such as `XMPP::Jid` and `QPointer`, and nothing unusual. The PR's new template deduction rounds change the token list and the symbol database, either by an incremental update (removing and adding symbols, clearing type pointers) or by a full rebuild. That process apparently leaves some type references unresolved that main resolved. Several other files in this package show the same new debug message. A new debug message like this means Cppcheck understands the code worse, so this is a regression. ---- 29 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/psi/psi_1.5+dfsg1.orig.tar.xz Result: your psi-1.5/src/searchdlg.cpp:108:2: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, "SymbolDatabase couldn't resolve all user defined types", at the struct NickAndJid declared inside class SearchDlg::Private. The code is ordinary: the types used are Qt and XMPP classes, and nothing about it changed between the runs. The message appears only with the PR, which rebuilds or incrementally updates the symbol database after template type deduction. The same message also appears in several other files of this package. That suggests the rebuild or update leaves some type pointers unresolved that main resolves, i.e. Cppcheck understands the code worse. A new debug message of this kind counts as a regression. ---- 30 / 50 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/p/psi/psi_1.5+dfsg1.orig.tar.xz Result: your psi-1.5/src/tools/crash/crash_sigsegv.cpp:142:20: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: Line 142 casts `print` to the function-pointer type `int(*)(const char*, ...)`. Main reported only a style cstyleCast, so the cast type and the source type compared equal in the old ValueType model. Most likely `print` is already declared with this same function-pointer type, making the cast redundant but harmless. The PR adds a new FUNCTION value type, and that apparently makes the cast type and the variable type compare differently. The plain style note is now escalated to a 'potentially invalid type conversion' warning, which overstates a benign function-pointer cast. The declaration of `print` is not shown, so this cannot be confirmed. ---- 31 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/python-awkward/python-awkward_2.14.0.orig.tar.gz Result: your scikit-hep-awkward-7be7f2e/studies/awkward-forth/virtual-machine-no-vtables.cpp:237:8: style: The member function 'ForthOutputBufferOf < float >::write_one_uint16' can be static. [functionStatic] Explanation: `write_one_uint16` calls `write_one(value)`. That is a member function template of the class template `ForthOutputBufferOf`, and it updates instance state (`length_`, `ptr_`, resizing). So `write_one_uint16` uses `this` and cannot be static. With the PR, cppcheck now deduces and instantiates the `write_one(value)` call inside the class template instantiation. It apparently no longer links the call to a non-static member, so it wrongly reports functionStatic for every method of every instantiation. This is a new false positive. ---- 32 / 50 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/python-awkward/python-awkward_2.14.0.orig.tar.gz Result: your scikit-hep-awkward-7be7f2e/studies/awkward-forth/virtual-machine-no-vtables.cpp:337:15: style: Unused private function: 'ForthOutputBufferOf < uint32_t >::write_one' [unusedPrivateFunction] Explanation: `write_one` is a private member template of `ForthOutputBufferOf`. It is called by the public `write_one_*` members, for example `write_one_uint32` at line 243. The PR's new type deduction rewrites those calls to concrete instantiations such as `write_one`. The generic template copy left in the class instantiation then looks unused, so Cppcheck reports 'Unused private function'. The function is in fact used, so this is a new false positive. The functionStatic warnings added for the `write_one_*` callers point the same way: `write_one` modifies `length_` and `ptr_`, so those callers cannot be static, yet they are now reported as such. ---- 33 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qbs/qbs_3.3.1.orig.tar.gz Result: your qbs-src-3.3.1/src/plugins/generator/visualstudio/visualstudiogenerator.cpp:68:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new 'SymbolDatabase couldn't resolve all user defined types' debug message at the VisualStudioGeneratorPrivate class. The source code did not change; only the PR's new type-deduction rounds did. These rounds incrementally update or rebuild the symbol database after instantiating deduced function templates, and as a result some type pointers (likely Internal::VisualStudioVersionInfo or the qualified types used in members) are no longer resolved. A new debug/bailout message caused by the PR's symbol database changes means Cppcheck understands the code worse. ---- 34 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/q/qt6-3d/qt6-3d_6.11.2+dfsg.orig.tar.xz Result: your qt3d-everywhere-src-6.11.2/src/3rdparty/assimp/src/code/AssetLib/Assbin/AssbinFileWriter.cpp:66:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable T [valueFlowBailoutIncompleteVar] Explanation: Line 66 is the body of the generic `Write` function template. Before the PR this declaration was removed after its instantiations were made. The PR now defers removal of function templates, or keeps them when undeduced plain calls remain. So the uninstantiated generic body stays in the token list, and ValueFlow runs on it and bails out on the template parameter `T`, which it sees as an incomplete variable. This new bailout gives users no finding. It shows Cppcheck analysing raw template code it cannot understand, which is a side effect of the deferred or skipped template removal. ---- 35 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-cran-jinjar/r-cran-jinjar_0.3.2+dfsg.orig.tar.xz Result: your jinjar/src/template.h:10:1: debug: SymbolDatabase couldn't resolve all user defined types. [debug] Explanation: The PR adds a new debug message, 'SymbolDatabase couldn't resolve all user defined types', on class jinjar::Template. That class just has inja::Environment and inja::Template members and some member functions. Nothing in it involves function template type deduction. Main did not report this message on the same code. So the PR's symbol database changes appear to leave some type unresolved that was resolved before. Candidates are the new type-deduction rounds, the incremental update or rebuild, and moving phases into finalize(). A new debug or bailout message means Cppcheck understands the code worse. ---- 36 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/spaln/spaln_3.0.7+dfsg.orig.tar.xz Result: main spaln-ver.3.0.7/src/sortgrcd.cc:1114:46: style: C-style pointer casting [cstyleCast] Explanation: Column 46 is the cast `(CMPF) cmpcif`, which converts one comparison-function pointer type (CMPCIF, taking ChrInf pointers) to another (CMPF, the qsort comparator type). The PR gives function pointers their own FUNCTION value type. As a result, the cast is now classified as a potentially invalid conversion (dangerousTypeCast) instead of a generic C-style pointer cast. The style message at this location is replaced by a warning at the same spot. Calling qsort's comparator through a function pointer of a different signature is technically undefined behaviour, so the more specific warning describes the code more accurately. This removed line is the old, less precise half of that message change. ---- 37 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/spring/spring_106.0+dfsg.orig.tar.xz Result: main spring-106.0/AI/Skirmish/CircuitAI/src/lib/angelscript/source/as_scriptengine.cpp:4625:31: style: C-style pointer casting [cstyleCast] Explanation: Line 4625 casts `i->func`, an `asFUNCTION_t` (`void(*)()`), to `bool(*)(void*,void*)` with a C-style cast. Converting between unrelated function pointer types cannot be done with static_cast; in C++ it needs reinterpret_cast, and calling through the wrong type is undefined behaviour. The PR adds a FUNCTION value type, so Cppcheck now knows both sides are function pointers. It therefore reports the cast as `dangerousTypeCast` (a potentially invalid conversion) instead of the generic `cstyleCast` style message. That classification fits the code better. The AngelScript code is intentional type erasure and is valid as long as the registered function really has this signature, so the higher severity is debatable. The removed line is one half of a message change rather than a lost true positive. ---- 38 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/spring/spring_106.0+dfsg.orig.tar.xz Result: main spring-106.0/rts/lib/assimp/code/BlenderLoader.cpp:307:23: style: The member function 'Assimp::BlenderImporter::ExtractScene' can be static. [functionStatic] spring-106.0/rts/lib/assimp/code/BlenderLoader.h:140:10: note: The member function 'Assimp::BlenderImporter::ExtractScene' can be static. spring-106.0/rts/lib/assimp/code/BlenderLoader.cpp:307:23: note: The member function 'Assimp::BlenderImporter::ExtractScene' can be static. Explanation: ExtractScene uses no members of BlenderImporter. It only reads its parameters, calls methods on them (ss.Convert, file.reader), and calls ThrowException, format() and DefaultLogger::get(). In assimp, ThrowException is a static member of the base class template LogFunctions. So the function could really be static, and the removed functionStatic warning looks like a true positive. The PR now instantiates the call ss.Convert(out,file) and changes how template calls and bases are resolved. That probably makes cppcheck see a call it treats as possibly non-static, which suppresses the warning: a new false negative. ---- 39 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/spring/spring_106.0+dfsg.orig.tar.xz Result: your spring-106.0/AI/Skirmish/CircuitAI/src/lib/angelscript/source/as_scriptengine.cpp:4265:22: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: Line 4265 casts the stored generic function pointer `i->func` (an `asFUNCTION_t`) back to its real signature `int (*)(void*)`. This is the usual AngelScript pattern. Converting between function pointer types is well defined (it is what `reinterpret_cast` allows), and a round trip back to the original type is safe. Main reported this as the accurate style note 'C-style pointer casting'. The PR adds a new FUNCTION ValueType and treats it as primitive, so the cast is now reported as a warning-severity 'Potentially invalid type conversion' (dangerousTypeCast). Nothing about this cast is invalid. The PR raises the severity and makes the message less accurate for correct code, and the same switch appears on several similar casts in this file. ---- 40 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/spring/spring_106.0+dfsg.orig.tar.xz Result: your spring-106.0/AI/Skirmish/CircuitAI/src/lib/angelscript/source/as_scriptengine.cpp:4631:14: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] Explanation: Line 4631 casts `i->func`, a generic function pointer (`asFUNCTION_t`, `void(*)()`), to `bool(STDCALL*)(void*,void*)`. Main only knew this as a pointer cast and reported style `cstyleCast`. The PR adds a FUNCTION ValueType, so Cppcheck now sees a conversion between unrelated function pointer types. In C++ that cast can only be done with `reinterpret_cast`, and calling through a mismatched function type is undefined behaviour. That is what `dangerousTypeCast` is meant to flag, so the new classification describes the cast more accurately. AngelScript does this on purpose, since the stored function really has that signature, so users may see the higher severity as noise. The cast is still genuinely reinterpret-like, so the warning is technically correct rather than a false positive. Confidence is low because the exact deciding logic in `isDangerousTypeConversion` is not shown. ---- 41 / 50 ---- Verdict: UNCLEAR (low confidence) Package: https://ftp.debian.org/debian/pool/main/s/storm-lang/storm-lang_0.8.2+dfsg.orig.tar.gz Result: main storm-lang-0.8.2+dfsg/CppTypes/Auto.h:42:28: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable ptr [valueFlowBailoutIncompleteVar] Explanation: The removed line is a valueFlowBailoutIncompleteVar debug message for `ptr` in the member template `Auto::as()`. `ptr` is a declared member of the class template, so calling it incomplete was a weakness, and losing the bailout could mean Cppcheck now resolves the member. But `as()` has no arguments, so the PR's argument-type deduction cannot instantiate it. The PR also changes when template declarations are removed or kept (deferred removal, symbol database updates). So the message may have vanished only because this generic body is now handled or removed differently, not because it is analyzed better. The same run adds a new incomplete-variable bailout in Str.cpp, which points to changed handling rather than a clear gain. The diff alone does not show which explanation applies. ---- 42 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/storm-lang/storm-lang_0.8.2+dfsg.orig.tar.gz Result: your storm-lang-0.8.2+dfsg/Core/CloneEnv.h:46:39: style: C-style pointer casting [cstyleCast] Explanation: Column 39 on line 46 is the `(RootObject *)obj` cast. That is a real C-style cast to a class pointer, and it also silently drops the const of `const T *`. Before the PR, cppcheck never checked this template body because calls like `clone(obj, env)` (from `cloned()`) were not instantiated. Now type deduction instantiates the template, so the cast is analysed. The cstyleCast style warning is correct for this C++ code, so this is a new true positive. ---- 43 / 50 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/s/storm-lang/storm-lang_0.8.2+dfsg.orig.tar.gz Result: your storm-lang-0.8.2+dfsg/Core/Str.cpp:486:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable useEscape [valueFlowBailoutIncompleteVar] Explanation: `useEscape` is clearly a declared name in the enclosing escape-parsing function, most likely a function parameter; the function header is not shown. The new bailout only appears with the PR. That points to the PR now instantiating this function template through argument type deduction, and the instantiated copy (or its incremental varid/symbol update) leaving `useEscape` unresolved. ValueFlow then skips the whole function because of an 'incomplete variable' that is not really incomplete. A new debug bailout of this kind means Cppcheck understands the code worse. ---- 44 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/t/trompeloeil-cpp/trompeloeil-cpp_49.orig.tar.xz Result: your trompeloeil-cpp-49/compilation_errors/illegal_move_mock.cpp:32:12: style: Variable 'obj' is assigned a value that is never used. [unreadVariable] Explanation: With the PR, `ident(M{})` is deduced and instantiated as `ident`, so cppcheck now knows that `obj` has type M. `obj` is initialized and never read again in main, and dropping the variable would still perform the call and the copy/move. The warning is therefore technically correct, and the new deduction made it possible. One caveat lowers confidence: in real code M contains trompeloeil mock members with non-trivial destructors, which cppcheck cannot see without the header. ---- 45 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vite/vite_1.4.orig.tar.gz Result: main vite-1.4/tests/render/Trace.hpp:26:10: style: The member function 'Trace::build' can be static. [functionStatic] Explanation: `Trace::build` never uses `this`, so the functionStatic warning is a true positive. The PR did not drop it. It now deduces the template argument from the call, instantiates `build>`, and reports the same warning at the same location under the instantiated name. The removed main line is just the old wording of a warning that is still reported. Users see the same finding either way, only the function name in the message differs. ---- 46 / 50 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/v/vite/vite_1.4.orig.tar.gz Result: your vite-1.4/tests/render/Trace.hpp:26:10: style: The member function 'Trace::build < Render < Render_opengl > >' can be static. [functionStatic] vite-1.4/tests/render/Trace.hpp:26:10: note: The member function 'Trace::build < Render < Render_opengl > >' can be static. vite-1.4/tests/render/Trace.hpp:26:10: note: The member function 'Trace::build < Render < Render_opengl > >' can be static. Explanation: `Trace::build` is a member function template that does not use any members (it only prints and calls `r.draw()`), so the functionStatic finding is correct before and after the PR. The PR now deduces `B = Render` and instantiates the template, so the same warning at the same line is reported for the instantiation. The message now names the instantiation, `build < Render < Render_opengl > >`, and carries two identical declaration/definition notes at the same location. That is slightly noisier, but it is still the same true positive, so this is essentially the same report reworded. ---- 47 / 50 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/v/vtk9/vtk9_9.6.2+ds.orig.tar.xz Result: your vtk9-9.6.2+ds/IO/Avmesh/BinaryFile.h:22:23: portability:inconclusive: Casting from double * to char * is not portable due to different binary data representations on different platforms. [invalidPointerCast] Explanation: ReadOne() calls ReadArray(&x, 1) without template arguments. With the PR, T is deduced from '&x', so ReadArray is now instantiated. This is presumably via ReadDouble() calling ReadOne, though that file is not shown. In the instantiation, '(char*)array' really is a cast from double* to char*, and the code reads raw bytes from a file into doubles. That does depend on the platform's floating point representation, which is what this inconclusive portability check flags; cppcheck reports the same for an equivalent non-template cast. The new finding comes from correct template deduction rather than misunderstood code. It is low-value noise, though, since byte-wise I/O through char* is well-defined and the code handles endianness. ---- 48 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/w/whitedune/whitedune_0.30.10.orig.tar.gz Result: your whitedune-0.30.10/src/MainWindow.cpp:1377:33: style: C-style pointer casting [cstyleCast] Explanation: With the PR, the call `removeTexCoordTemplate(faceSet)` deduces `TexCoordNode = NodeIndexedFaceSet*` from the argument variable, so the template is now instantiated and checked. Inside the instantiation, `(TexCoordNode) node` is a C-style cast to a pointer type. It is even a redundant identity cast. Every call of this template passes a pointer, so the C-style pointer cast exists in every instantiation, and the cstyleCast style warning describes the code correctly. It is a new true positive that comes from Cppcheck now analysing the template body. ---- 49 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/w/whitedune/whitedune_0.30.10.orig.tar.gz Result: your whitedune-0.30.10/src/MainWindow.cpp:1405:27: style: C-style pointer casting [cstyleCast] Explanation: The PR now deduces template arguments from non-literal arguments. So `removeColorTemplate(faceSet)` is instantiated with `ColorNode = NodeIndexedFaceSet*`, and the template body gets analysed. In every instantiation, `(ColorNode) node` is a C-style cast to a pointer type. It is in fact a redundant identity cast that should be a `static_cast` or simply removed. The warning is therefore a legitimate new true positive. It matches the C-style pointer cast warnings cppcheck already gives for the explicit `(NodeIndexedFaceSet *) node` casts in the same file. ---- 50 / 50 ---- Verdict: ACCEPTABLE REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/z/zdbsp/zdbsp_1.19+20181027+dfsg.1.orig.tar.xz Result: main zdbsp-1.19+20181027+dfsg.1/blockmapbuilder.cpp:175:29: style: The scope of the variable 'block' can be reduced. [variableScope] Explanation: In BuildBlockmap, `block` and `endblock` are declared at function scope. In this zdbsp/ZDoom code they are only assigned and used inside the branches of the `for (line ...)` loop body, where they walk ranges of BlockLists. Nothing after the loop appears to use them, so the variableScope warning was most likely a true positive. The PR removes both warnings for this declaration, probably as a side effect of the changed template/symbol-database handling, not because the code changed. Losing a likely true positive is an acceptable regression. Confidence is medium because the rest of the function is not shown.