AI review of 2026-11-30_03-17-52-8a1792f6dda2-results.txt PR: #8720 https://github.com/cppcheck-opensource/cppcheck/pull/8720 Tested: 8a1792f6dda2898342906aac43105f376371f5bc Merge base: 4ccfcc6ff3df225b62a02318b2f34a722b1beecc Reviewed: 2026-12-02 05:24:26 UTC Model: claude-opus-5-5 (effort high) Results: 30 reviewed of 236 in the report (random sample), 1 not reviewed: valueFlowMaxIterations, the test is still running (600 analysed of 1000 requested packages) Verdicts: 11 improvement, 9 neutral, 10 regression Tokens: 80020 input, 1894920 cache read, 473730 cache write, 22547 output The verdicts are written by AI and can be wrong. ---- 1 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ardour/ardour_9.10.0+ds.orig.tar.xz Result: your ardour-9.10.0+ds/libs/ardour/minibpm.cc:321:10: style: The member function 'breakfastquay::MiniBPM::D::copy < double , double >' can be static. [functionStatic] ardour-9.10.0+ds/libs/ardour/minibpm.cc:321:10: note: The member function 'breakfastquay::MiniBPM::D::copy < double , double >' can be static. ardour-9.10.0+ds/libs/ardour/minibpm.cc:321:10: note: The member function 'breakfastquay::MiniBPM::D::copy < double , double >' can be static. Explanation: `D::copy` is a member function template whose body only uses its parameters `t`, `s` and `n` and never touches `this`. So 'can be static' is a true positive. Main reported it for the generic template `copy`. With the PR, deduction instantiates `copy` from the calls, so the same warning at the same location now names the instantiation (`copy < double , double >`, plus a second one for ``). The finding itself is unchanged and still correct. Naming the instantiation instead of the template, and repeating the warning per instantiation, is a cosmetic change rather than a gain or loss in accuracy. ---- 2 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/a/ardour/ardour_9.10.0+ds.orig.tar.xz Result: your ardour-9.10.0+ds/libs/ardour/minibpm.cc:329:10: style: The member function 'breakfastquay::MiniBPM::D::unityNormalise < double >' can be static. [functionStatic] ardour-9.10.0+ds/libs/ardour/minibpm.cc:329:10: note: The member function 'breakfastquay::MiniBPM::D::unityNormalise < double >' can be static. ardour-9.10.0+ds/libs/ardour/minibpm.cc:329:10: note: The member function 'breakfastquay::MiniBPM::D::unityNormalise < double >' can be static. Explanation: `MiniBPM::D::unityNormalise` uses only its parameters `t` and `n` and touches no members, so it can indeed be static. Main reported this for the template; the PR now deduces `T=double` from the call, instantiates `unityNormalise`, and reports the same true positive at the same line under the instantiated name. The finding is unchanged. The only differences are cosmetic: the name now carries the `` suffix, and two redundant note lines repeat the message. Users get the same warning either way. ---- 3 / 30 ---- 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 typed it wrongly as `double **` and warned about casting it to `char *` for `bzero`, the usual idiom for zeroing memory. The PR adds a FUNCTION value type, so the array is now understood as an array of function pointers, and this false invalidPointerCast warning disappears. ---- 4 / 30 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/d/digikam/digikam_9.1.0.orig.tar.xz Result: your digikam-9.1.0/core/libs/dimg/filters/greycstoration/cimg/CImg.h:14697:13: style: The member function 'Digikam::cimg_library::CImg < unsigned char >::get_permute_axes' can be static. [functionStatic] Explanation: get_permute_axes() calls _get_permute_axes(order,foo). That is a non-static const member function template of CImg, and it reads the object's data, width, height, depth and dim. So get_permute_axes uses *this and cannot be static. The PR's new type deduction now instantiates this call as _get_permute_axes. After that, Cppcheck evidently no longer links the call to a member function, so the functionStatic check treats the body as not using the object. The new warning is a false positive. ---- 5 / 30 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/elpa/elpa_2026.02.002.orig.tar.gz Result: your elpa-2026.02.002/src/invert_trm/GPU/SYCL/elpa_invert_trm_sycl.cpp:181:59: style: Parameter 'l_rows_in' can be declared as pointer to const [constParameterPointer] Explanation: The PR now deduces template arguments from variable arguments (e.g. `double*`), so the function template `sycl_copy_a_tmat1_FromC` gets instantiated and checked. The parameter `l_rows_in` has the non-dependent type `int *`. It is only dereferenced for reading (`int l_rows = *l_rows_in;`), so it could be `const int *`. All callers pass `int*`, which converts implicitly to `const int*`. The new warning is a true positive, made possible because the PR now analyzes this template body. ---- 6 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gerbera/gerbera_3.3.0+dfsg.orig.tar.xz Result: main gerbera-3.3.0/src/contrib/cxxopts.hpp:1226:36: style: Argument 'value' shadows outer function [shadowFunction] gerbera-3.3.0/src/contrib/cxxopts.hpp:1348:1: note: Shadowed function gerbera-3.3.0/src/contrib/cxxopts.hpp:1226:36: note: Shadow argument Explanation: This is the same shadowFunction warning for the parameter 'value' at line 1226. Only the 'Shadowed function' note changed, from line 1348 to line 1341. cxxopts declares overloaded function templates named `value` (e.g. `value()` and `value(T&)`) next to each other. The PR's template deduction now instantiates or keeps one of them differently, so the other overload is picked as the shadowed function. Both are valid `value` functions, so the warning's meaning and accuracy are unchanged. ---- 7 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gerbera/gerbera_3.3.0+dfsg.orig.tar.xz Result: main gerbera-3.3.0/src/contrib/cxxopts.hpp:2447:67: style: Argument 'value' shadows outer function [shadowFunction] gerbera-3.3.0/src/contrib/cxxopts.hpp:1348:1: note: Shadowed function gerbera-3.3.0/src/contrib/cxxopts.hpp:2447:67: note: Shadow argument Explanation: The same shadowFunction warning is still reported at 2447:67. Only the note for the shadowed function changed, from line 1348 to line 1341. In cxxopts, both lines are overloads of the free function template `cxxopts::value` (`value()` and `value(T&)`). Pointing at either overload is equally valid. The change most likely comes from a different order in the function list after the PR's template handling changes. Users see no change in substance. ---- 8 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gerbera/gerbera_3.3.0+dfsg.orig.tar.xz Result: your gerbera-3.3.0/src/contrib/cxxopts.hpp:1226:36: style: Argument 'value' shadows outer function [shadowFunction] gerbera-3.3.0/src/contrib/cxxopts.hpp:1341:1: note: Shadowed function gerbera-3.3.0/src/contrib/cxxopts.hpp:1226:36: note: Shadow argument Explanation: cxxopts declares two outer function templates named `value`: `value()` (around line 1341) and `value(T& t)` (around line 1348). The parameter `value` in `default_value` shadows that name in both versions. Only the cited 'Shadowed function' location moved from 1348 to 1341. This is likely because the PR now instantiates or removes the deduced `value(T&)` template differently. Both locations are correct, so the warning is equally valid and users are not affected. ---- 9 / 30 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/g/gridtools/gridtools_2.3.9.orig.tar.gz Result: main gridtools-2.3.9/_deps/googletest-src/googletest/test/googletest-printers-test.cc:1185:8: style: struct member 'const_iterator::x' is never used. [unusedStructMember] Explanation: `struct const_iterator { char x; }` is a test type. An instance is zero-initialized and passed to googletest's generic `Print(it)`, which prints the object's raw bytes ("1-byte object <00>"). The member exists so the struct has one defined byte to print. It is used through the object representation, not by name. With the PR, the call `Print(it)` is now deduced and instantiated with `const_iterator`, so Cppcheck sees the struct being consumed by generic code and no longer reports the member as unused. The same change happened for `iterator::x`. Dropping this noisy style warning on a deliberately byte-inspected struct is reasonable, so the removal is a likely false positive going away. ---- 10 / 30 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gstreamer-vaapi/gstreamer-vaapi_1.26.2.orig.tar.xz Result: your gstreamer-vaapi-1.26.2/gst-libs/gst/vaapi/gstvaapiutils_glx.c:690:5: portability: Returning an integer in a function with pointer return type is not portable. [CastIntegerToAddressAtReturn] Explanation: `get_proc_func` has type `GLXGetProcAddressProc`, a function pointer typedef. The function `get_proc_address_func` returns that same function-pointer type, so line 690 returns a pointer, not an integer. The new CastIntegerToAddressAtReturn warning is a false positive. It most likely comes from the PR's new FUNCTION/MEMBER_POINTER ValueType handling for parenthesized function declarators, which makes the 64-bit portability check see the variable as non-pointer/primitive. Main did not report it. ---- 11 / 30 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gstreamer-vaapi/gstreamer-vaapi_1.26.2.orig.tar.xz Result: your gstreamer-vaapi-1.26.2/gst-libs/gst/vaapi/gstvaapiutils_glx.c:694:5: portability: Returning an integer in a function with pointer return type is not portable. [CastIntegerToAddressAtReturn] Explanation: `get_proc_func` is a function pointer of type `GLXGetProcAddressProc`, which is also the return type of `get_proc_address_func`. Returning it is not returning an integer, so the new CastIntegerToAddressAtReturn warning is a false positive. It most likely comes from the PR's new FUNCTION ValueType: after typedef expansion the nested function-pointer declarator gets a wrong type or pointer level, so the returned value is treated as non-pointer or integral. ---- 12 / 30 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/icewm/icewm_4.1.0.orig.tar.xz Result: your icewm-4.1.0/src/icesh.cc:553:27: style: Argument 'data' shadows outer function [shadowFunction] icewm-4.1.0/src/icesh.cc:569:8: note: Shadowed function icewm-4.1.0/src/icesh.cc:553:27: note: Shadow argument Explanation: `YProperty::substitute(char* data, Atom type)` has a parameter named `data`, and the same class declares the member function template `data()` at line 569. Inside `substitute` the parameter hides that member, which is exactly the case shadowFunction reports. Main missed it because the generic `data` template was removed from the token list once its explicit instantiations were made. With the PR the generic declaration stays (its removal is deferred while calls remain), so the symbol database sees the `data` member and the check fires. Cppcheck reports the same thing for an ordinary member function, so this is a consistent true positive under the check's semantics. The same cause also produces side effects in this package, such as the debug bailout on the incomplete type T, but this particular warning is correct. ---- 13 / 30 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/ifcopenshell/ifcopenshell_0.9.0+dfsg2.orig.tar.xz Result: your ifcopenshell-0.9.0/src/ifcviewer/FederationMath.h:40:1: debug: TemplateSimplifier: pass count limit hit before simplifications were finished. [debug] Explanation: The PR adds a new debug message: 'TemplateSimplifier: pass count limit hit before simplifications were finished'. It is reported at the first token of the translation unit, in this case the start of FederationConfig, but the real cause is template-heavy included code such as Eigen. The PR now defers template removal and adds type-deduction rounds, and this makes the simplifier hit the 10-pass limit where main did not. Hitting the limit means template simplification was left unfinished, so Cppcheck now understands this code worse. Since this is a new debug/bailout-style message, it counts as a regression. ---- 14 / 30 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/i/immer/immer_0.9.1+dfsg.orig.tar.xz Result: your immer-0.9.1/test/flex_vector/fuzzed-1.cpp:40:68: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VarCount [valueFlowBailoutIncompleteVar] Explanation: The new line is a debug bailout (valueFlowBailoutIncompleteVar) inside the generic `run_input` function template. `VarCount` is a non-type template parameter with a default value, so the call cannot be deduced by the new type deduction code. The PR's deferred removal and remaining-calls logic probably now keeps or analyses the uninstantiated generic body, where `VarCount` is an unknown identifier. As a result ValueFlow skips that function. A new bailout message means Cppcheck understands this code worse than before, not better. ---- 15 / 30 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/k/kiwisolver/kiwisolver_1.5.1.orig.tar.gz Result: your kiwisolver-1.5.1/py/src/symbolics.h:56:12: style: The member function 'kiwisolver::BinaryInvoke < CmpGE , Variable >::invoke < Normal >' can be static. [functionStatic] kiwisolver-1.5.1/py/src/symbolics.h:56:12: note: The member function 'kiwisolver::BinaryInvoke < CmpGE , Variable >::invoke < Normal >' can be static. kiwisolver-1.5.1/py/src/symbolics.h:56:12: note: The member function 'kiwisolver::BinaryInvoke < CmpGE , Variable >::invoke < Normal >' can be static. Explanation: `BinaryInvoke::invoke` never uses `this`. Its body only calls static `TypeCheck` functions and Python C-API macros, and it calls a temporary `Invk()`. So it really could be static, and the new functionStatic warning for the `CmpGE, Variable` / `Normal` instantiation is a true positive. The PR now instantiates and analyzes more template code, which surfaces it. It is only reported for some instantiations (only `CmpGE`), but this warning itself is correct. ---- 16 / 30 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libc/libcitygml/libcitygml_2.5.2.orig.tar.gz Result: your libcitygml-2.5.2/sources/src/parser/addressparser.cpp:42:64: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable args [valueFlowBailoutIncompleteVar] Explanation: The new message is a debug bailout inside the body of the generic variadic template `make_unique` (`std::forward(args)...`). On main the generic template declaration was removed after instantiation, so its body was never analyzed. With the PR the declaration is kept. Either its removal is deferred for pending type deductions, or `hasRemainingCalls` matched an unrelated call such as `std::make_unique(`, which `isPlainCall` accepts after skipping the qualification. The variadic template cannot be deduced anyway. ValueFlow now runs on uninstantiated template code and bails out on the incomplete variable `args`. This is a new bailout that shows worse handling of the code, not better understanding. ---- 17 / 30 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/mecab/mecab_0.996.orig.tar.gz Result: your mecab-0.996/src/utils.h:81:5: style: The scope of the variable 'mod' can be reduced. [variableScope] Explanation: With the PR, calls like uitoa(x, buf) now get their template argument deduced, so the uitoa template is instantiated and checked. In it, `T mod;` is declared at function scope, but it is only used inside the while loop, and it is assigned (`mod = val % 10`) before each use. Declaring it inside the loop would behave identically. The deduced T is an integral type, so there are no construction-cost concerns. The variableScope warning is a valid new true positive. ---- 18 / 30 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/muse/muse_4.3.0.orig.tar.gz Result: your muse-sequencer-muse-8d1030d/src/muse/widgets/mmath.cpp:92:26: style: Parameter 'array' can be declared as pointer to const [constParameterPointer] Explanation: `qwtGetMax` only reads `array` (`rv = array[0]` and `qwtMax(rv, array[i])`). `qwtMax` is a function template in qwt's mmath.h that takes its arguments by value or by const reference. Before the PR, the call `qwtMax(rv, array[i])` was not instantiated, so Cppcheck could not rule out that `array[i]` is modified and stayed silent. With the PR, the template argument is deduced from the call (double), so the instantiated function's parameters are known to be read-only. Nothing writes through `array`, so `const double *array` is valid and the new constParameterPointer warning is a true positive. ---- 19 / 30 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/o/onnxruntime/onnxruntime_1.27.1+dfsg.orig.tar.xz Result: main microsoft-onnxruntime-df2ba1c/onnxruntime/test/optimizer/nchwc_optimizer_test.cc:82:12: style: The member function 'onnxruntime::test::NchwcTestHelper::Make1DInitializer < float >' can be static. [functionStatic] microsoft-onnxruntime-df2ba1c/onnxruntime/test/optimizer/nchwc_optimizer_test.cc:82:12: note: The member function 'onnxruntime::test::NchwcTestHelper::Make1DInitializer < float >' can be static. microsoft-onnxruntime-df2ba1c/onnxruntime/test/optimizer/nchwc_optimizer_test.cc:82:12: note: The member function 'onnxruntime::test::NchwcTestHelper::Make1DInitializer < float >' can be static. Explanation: Make1DInitializer calls MakeInitializer(...), a non-static member template that uses graph_. The function therefore cannot be static. Main's functionStatic warning was a false positive, probably because the undeduced call MakeInitializer({..}, data) was not linked to the member function. With the PR the generic template stays available for that call, so Cppcheck sees the member call and drops the false positive. ---- 20 / 30 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/opentelemetry-cpp/opentelemetry-cpp_1.28.0.orig.tar.gz Result: your opentelemetry-cpp-1.28.0/opentracing-shim/test/shim_mocks.h:128:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable N [valueFlowBailoutIncompleteVar] Explanation: Line 128 is inside the generic body of the function template `ToLowerBase16`. Its only callers pass the template arguments explicitly (`ToLowerBase16(...)`), so there is nothing to deduce. The new bailout says `N` is an incomplete variable, which means Cppcheck now analyses the uninstantiated template body, where the template parameter `N` is unknown. Most likely the PR's deferred-removal / remaining-call logic keeps the generic declaration in the token list where main removed it. The result is a new debug bailout on code Cppcheck cannot meaningfully analyse, with no gain for users, so it is a small regression. ---- 21 / 30 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plastimatch/plastimatch_1.10.0+dfsg.2.orig.tar.xz Result: your plastimatch-1.10.0+dfsg.2/src/register/bspline_loop.txx:172:12: style: Variable 'f_img' can be declared as pointer to const [constVariablePointer] Explanation: bspline_loop_tile_serial is a function template that is called without explicit template arguments. With the PR, Cppcheck deduces the template argument and instantiates it, so the concrete loop_function of the Bspline_loop_user class is known. In this function, f_img is only initialized from fixed->img and then passed to bspline_loop_user.loop_function. It is never written through. The constVariablePointer check only fires when the called parameter is a pointer to const. So the resolved loop_function must take const float* for the image data. That fits a scoring loop that only reads the fixed and moving images. The variable could therefore be declared const float*, which makes this a new true positive. Confidence is medium because a template can have several instantiations, and the warning would be wrong if any other loop_user took a non-const float*. Nothing in the code shown suggests that. ---- 22 / 30 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plastimatch/plastimatch_1.10.0+dfsg.2.orig.tar.xz Result: your plastimatch-1.10.0+dfsg.2/src/register/bspline_loop.txx:58:12: style: Variable 'm_img' can be declared as pointer to const [constVariablePointer] Explanation: `m_img` points at the moving image's voxel data in `bspline_loop_voxel_serial`. The template is now instantiated because its `Bspline_loop_user` argument is deduced from the call. The function only reads the image: it interpolates moving intensities (LI_VALUE) and passes `m_img` to the user's `loop_function`. In plastimatch that parameter is documented as an input and is likely `const float*`, though that signature is not shown here. So `m_img` is never written through, and it could be `const float*`. The new warning is most likely a true positive revealed by the better template instantiation. Not fully certain: if any `Bspline_loop_user` takes a non-const `float*`, the warning would be a false positive. ---- 23 / 30 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/plastimatch/plastimatch_1.10.0+dfsg.2.orig.tar.xz Result: your plastimatch-1.10.0+dfsg.2/src/test/smartp_test_i.cxx:109:22: style: Parameter 'u1' can be declared as reference to const [constParameterReference] Explanation: `C::New` is a generic forwarding factory template with parameters `U1& u1, ..., U6& u6`. The PR now deduces the call `C::New(a, b, a, b, b, a)` and instantiates it. The warning is then based on that one instantiation, where `u1` happens to bind to the constructor's `const A&` parameter. Whether `u1` can be const depends on `U1` and on which constructor gets selected; the parallel `u3` is non-const for the same reason. Cppcheck normally avoids const suggestions for template-dependent parameters, and this PR itself adds `isTemplateArg` skips elsewhere. Advising const on a forwarding template parameter from a single instantiation is misleading, so this is a new false positive. ---- 24 / 30 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/p/pmemkv/pmemkv_1.4.orig.tar.gz Result: your pmemkv-1.4/src/libpmemkv.hpp:262:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable s [valueFlowBailoutIncompleteVar] Explanation: Line 262 is the out-of-line destructor of the class template result, and `s` is a member of that class. Main did not report this bailout. With the PR, Cppcheck treats `s` as an incomplete (unknown) variable here. The most likely cause is that the generic template definition now stays in the token list, for example through the PR's deferred or kept template declarations, without being linked to the class scope. The new valueFlowBailoutIncompleteVar debug message means ValueFlow now skips this function, so Cppcheck understands the code worse than before. ---- 25 / 30 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/q/qt-gstreamer/qt-gstreamer_1.2.0.orig.tar.xz Result: your qt-gstreamer-1.2.0/src/QGlib/value.h:302:20: style: The member function 'QGlib::Value::init < QGlib :: RefPointer < Sample > >' can be static. [functionStatic] qt-gstreamer-1.2.0/src/QGlib/value.h:133:17: note: The member function 'QGlib::Value::init < QGlib :: RefPointer < Sample > >' can be static. qt-gstreamer-1.2.0/src/QGlib/value.h:302:20: note: The member function 'QGlib::Value::init < QGlib :: RefPointer < Sample > >' can be static. Explanation: `Value::init()` calls `init(GetType())`, which is the non-template, non-static overload `Value::init(Type)`. That overload sets up the object's own data (the member `d`), so `init` uses `this` and cannot be static. The new functionStatic warning on the instantiation `init>` is therefore a false positive. It most likely comes from the new instantiation or the incremental symbol database update failing to resolve the call to the member overload. ---- 26 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-other-x4r/r-other-x4r_1.0.1+git20150806.c6bd9bd.orig.tar.xz Result: main r-other-x4r-1.0.1+git20150806.c6bd9bd/src/rapidxml.hpp:1513:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Flags [valueFlowBailoutIncompleteVar] Explanation: Line 1513 is `if (Flags & parse_no_utf8)` in the function template `insert_coded_character`. Main skipped the function because the template parameter `Flags` was an incomplete variable. With the PR the template is instantiated, so `Flags` becomes a concrete value. The same function is still skipped, now because of `parse_no_utf8` at column 25 (the paired 'your' line). In main, `parse_no_utf8` was probably also unresolved: the bailout names the first incomplete variable, and `Flags` comes first on the line. ValueFlow therefore skips this function both before and after the PR, and the debug message only names a different variable. Users see no practical difference. ---- 27 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-other-x4r/r-other-x4r_1.0.1+git20150806.c6bd9bd.orig.tar.xz Result: your r-other-x4r-1.0.1+git20150806.c6bd9bd/src/rapidxml.hpp:1725:14: style: The member function 'rapidxml::xml_document < char >::parse_bom < 0 >' can be static. [functionStatic] r-other-x4r-1.0.1+git20150806.c6bd9bd/src/rapidxml.hpp:1725:14: note: The member function 'rapidxml::xml_document < char >::parse_bom < 0 >' can be static. r-other-x4r-1.0.1+git20150806.c6bd9bd/src/rapidxml.hpp:1725:14: note: The member function 'rapidxml::xml_document < char >::parse_bom < 0 >' can be static. Explanation: `parse_bom` only reads and advances the `text` parameter. It never uses `this` or any member, so the 'can be static' warning is a true positive both before and after the PR. The PR now instantiates the member template from its call with `Flags=0`. The same warning at the same location therefore names the instantiation `parse_bom < 0 >` instead of `parse_bom`. That changes the wording, not whether the warning is correct. The suggestion still applies to the template the user wrote, so this makes no practical difference to users. ---- 28 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-other-x4r/r-other-x4r_1.0.1+git20150806.c6bd9bd.orig.tar.xz Result: your r-other-x4r-1.0.1+git20150806.c6bd9bd/src/rapidxml.hpp:2001:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable parse_no_data_nodes [valueFlowBailoutIncompleteVar] Explanation: In main, the generic member template parse_cdata was analysed with an unknown 'Flags', so valueFlowConditionExpressions bailed out on 'Flags'. With the PR, the call is deduced and parse_cdata<0> is instantiated, so 'Flags' is replaced by 0. The instantiated body is placed out of line, outside namespace rapidxml, and the namespace constant parse_no_data_nodes is no longer resolved there. The bailout therefore just moves to that token. Either way the function is skipped by this ValueFlow pass, so for users nothing changes: one debug bailout replaces another for the same function. ---- 29 / 30 ---- Verdict: NEUTRAL (medium confidence) Package: https://ftp.debian.org/debian/pool/main/r/r-other-x4r/r-other-x4r_1.0.1+git20150806.c6bd9bd.orig.tar.xz Result: your r-other-x4r-1.0.1+git20150806.c6bd9bd/src/rapidxml.hpp:2193:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable parse_validate_closing_tags [valueFlowBailoutIncompleteVar] Explanation: In main, ValueFlow skipped the generic template body of parse_node_contents because of the template parameter 'Flags'. With the PR, the instantiated body (Flags replaced by a constant) is analysed instead. It is still skipped by the same valueFlowConditionExpressions bailout, now naming the namespace constant 'parse_validate_closing_tags'. The function is skipped in both versions, so the debug output is just reworded and nothing changes for users. The new message does suggest the namespace constant is not resolved in the instantiated code, but that is not worse in practice than before. ---- 30 / 30 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sphinxsearch/sphinxsearch_2.8.2.orig.tar.gz Result: your manticore-2.8.2-190402-4e81114-release/mysqlse/snippets_udf.cc:67:9: style: Variable 'pSrc' can be declared as pointer to const [constVariablePointer] Explanation: The PR now deduces T for calls like `sphUnalignedRead(x)`, so the function template is instantiated and checked. Main skipped it because T was an incomplete variable (see the removed valueFlowBailoutIncompleteVar line). In the body, `pSrc` is only read through (`*pDst++ = *pSrc++`), and it points at the const parameter `tRef`, with the C cast dropping that const. Declaring it `const byte * pSrc = (const byte *) &tRef;` is valid and more correct. The new constVariablePointer warning is a true positive.