{ "tokens": { "input": 322902, "cache_read": 384356, "cache_write": 7844, "output": 35706 }, "reviews": [ { "key": [ "https://ftp.debian.org/debian/pool/main/c/courier/courier_2.0.6.orig.tar.bz2", "main courier-2.0.6/libs/maildir/maildirkeywords.h:169:37: warning: Member variable 'hashtable_entry < std :: string >::keyword' has no initializer. [uninitMemberVarNoCtor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`keyword` is a `typename keywordtable::iterator`, an iterator of a standard container. That is a class type with a default constructor (libstdc++ value-initializes the node pointer), so it is not an uninitialized POD member. The warning is therefore a false positive. It is also inconsistent: the analogous member `metadata` (`metadatatable::iterator`) was never flagged. After the PR changed how template names are resolved, the template instantiations come out differently and this false positive is gone. Users lose only a spurious warning. It is not certain whether the change comes from better or reduced instantiation, hence medium confidence." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/courier/courier_2.0.6.orig.tar.bz2", "main courier-2.0.6/libs/maildir/maildirkeywords.h:169:37: warning: Member variable 'hashtable_entry < unsigned long >::keyword' has no initializer. [uninitMemberVarNoCtor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`keyword` has type `keywordtable::iterator`, a standard container iterator. Iterators are class types with default constructors, so a struct without a user constructor does not leave this member uninitialized in the sense uninitMemberVarNoCtor means. The warning in main was a false positive, probably because the template/type lookup failed to resolve the iterator type. It was removed together with the similar warnings on the other iterator members, which fits the PR's better scope lookup for templates." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/courier/courier_2.0.6.orig.tar.bz2", "main courier-2.0.6/libs/maildir/maildirkeywords.h:171:19: warning: Member variable 'hashtable_entry < std :: string >::keyword_entry' has no initializer. [uninitMemberVarNoCtor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`keyword_entry` is a `std::list*>::iterator`. That is a class type with a default constructor; libstdc++ even sets its node pointer to null. Reporting it as a member variable with no initializer is a false positive. The PR changes how template names are resolved during instantiation, so the type is presumably no longer mangled and Cppcheck no longer treats the iterator as an uninitialized scalar. All related warnings for this struct disappeared together, which fits better type understanding rather than lost detection." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/courier/courier_2.0.6.orig.tar.bz2", "main courier-2.0.6/libs/maildir/maildirkeywords.h:171:19: warning: Member variable 'hashtable_entry < unsigned long >::keyword_entry' has no initializer. [uninitMemberVarNoCtor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`keyword_entry` is a `std::list*>::iterator`. That is a standard library class type with its own default constructor, not a POD that is left uninitialized. Cppcheck normally does not raise uninitMemberVarNoCtor for class-type members like this. The warning appeared only because main mis-resolved the dependent template type. The PR fixes template name lookup and scope handling, so the type is now understood better and this false positive goes away. The sibling warnings for the other iterator members disappear for the same reason." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/courier/courier_2.0.6.orig.tar.bz2", "main courier-2.0.6/libs/maildir/maildirkeywords.h:175:19: warning: Member variable 'hashtable_entry < std :: string >::metadata_entry' has no initializer. [uninitMemberVarNoCtor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`metadata_entry` is a `std::list<...>::iterator`, which is a class type with its own default constructor, so it does not need an explicit initializer. The warning was a false positive. The name `hashtable_entry < std :: string >` with spaces shows the template was not expanded cleanly, which is likely why Cppcheck mistook the iterator type for a scalar. The PR improves template name lookup, and all six similar warnings disappear with no new ones added, so Cppcheck now handles this code better." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/c/courier/courier_2.0.6.orig.tar.bz2", "main courier-2.0.6/libs/maildir/maildirkeywords.h:175:19: warning: Member variable 'hashtable_entry < unsigned long >::metadata_entry' has no initializer. [uninitMemberVarNoCtor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`metadata_entry` is a `std::list>::iterator`. That is a class type with a default constructor (libstdc++ value-initializes the node pointer), so an uninitMemberVarNoCtor warning on it is a false positive. The odd name 'hashtable_entry < unsigned long >' (with spaces) suggests the template was handled poorly before. The PR changes template name lookup and instantiation, which plausibly lets Cppcheck resolve the template and its iterator type correctly. Removing this warning is therefore a removed false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4384:9: warning: Member variable 'Option < GroupInfo >::storage' is not initialized in the constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`Option` keeps `storage` as a raw aligned char buffer (`alignas(alignof(T)) char storage[sizeof(T)]`). The buffer is only ever used as the target of placement new, and its bytes are never read before an object is constructed in it. Leaving it uninitialized in the constructor is intentional and correct, so the uninitMemberVar warning is noise (a false positive in practice). The warning only shows up now because the PR's improved template lookup lets Cppcheck instantiate `Option`, which is good in itself. Even so, this particular new diagnostic is a false positive users would have to suppress." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4384:9: warning: Member variable 'Option < TestCaseInfo >::storage' is not initialized in the constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The PR lets Cppcheck instantiate Option, which is used as the base of LazyStat in Catch. Better template instantiation in itself is fine, but this new warning is a false positive. Option's 'storage' is a raw aligned char buffer meant for placement new: `new( storage ) T(...)` builds the object in it, and it is only read through nullableValue after that. The default constructor sets nullableValue to nullptr and deliberately leaves the buffer uninitialized. Nothing reads the buffer uninitialized, so the warning is noise in idiomatic optional-type code." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4384:9: warning: Member variable 'Option < TestRunInfo >::storage' is not initialized in the constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The PR now instantiates `Option` as the base of `LazyStat`, and that new instantiation triggers this warning. In Catch's `Option`, `storage` is a raw aligned char buffer that exists only as the target of placement new (`new( storage ) T(...)`). Whether a value is present is tracked by `nullableValue`, which the default constructor sets to nullptr, and `storage` is never read before an object is constructed in it. Leaving it uninitialized is deliberate and correct, so this uninitMemberVar warning is noise (effectively a false positive), even though it comes from better template understanding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4385:9: style: Class 'Option < GroupInfo >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The PR fixes template lookup so that `LazyStat`'s base `Option` is now instantiated for `GroupInfo`, `TestCaseInfo` and `TestRunInfo`. `Option(T const& _value)` at line 4385 really is a single-argument constructor without `explicit`, so `noExplicitConstructor` correctly describes the code. Catch may want the implicit conversion on purpose, but that is the nature of this style check, not a false positive. The new warning comes from Cppcheck now seeing these instantiations, so it is a valid (if style-level) true positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4385:9: style: Class 'Option < TestCaseInfo >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "The PR improves template name lookup, so `LazyStat` (which derives from `Option`) is now instantiated correctly and its members get checked. `Option(T const& _value)` really is a single-argument constructor without `explicit`, so the noExplicitConstructor style warning is accurate for this instantiation. Catch makes the conversion implicit on purpose, but the check reports exactly what the code does. This is a new true positive that comes from Cppcheck understanding the templates better." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4385:9: style: Class 'Option < TestRunInfo >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 4385 declares `Option( T const& _value )`, a one-argument converting constructor without `explicit`. The noExplicitConstructor style warning is therefore technically correct, even though Catch may allow the implicit conversion on purpose. The PR now instantiates `Option`, the base of `LazyStat`, through the corrected template lookup. That makes the class visible to the checker, so this is a newly found true positive. The message names the instantiated class rather than the generic template, which may duplicate the warning across instantiations, but it is not wrong." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4385:9: warning: Member variable 'Option < GroupInfo >::storage' is not initialized in the constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`Option` is Catch's optional type. `storage` is a raw aligned byte buffer, and this constructor builds the value inside it with `new( storage ) T( _value )`. The buffer is therefore filled by the placement new, and leaving it as raw bytes is the intended design. Reporting `storage` as uninitialized in this constructor is a false positive. The PR lets Cppcheck instantiate `Option` correctly through `LazyStat`, which is better template handling. That change exposes this existing false-positive pattern, so the warning users now see is noise." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4385:9: warning: Member variable 'Option < TestCaseInfo >::storage' is not initialized in the constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`storage` is a raw aligned byte buffer used only for placement new. In `Option(T const& _value)` it is filled by `new(storage) T(_value)`, so there is no uninitialized-member bug here. The PR now correctly instantiates `Option` through `LazyStat`, but the warning this produces is a false positive. It is noise for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4385:9: warning: Member variable 'Option < TestRunInfo >::storage' is not initialized in the constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`storage` is a raw aligned char buffer that exists only for placement new. The constructor at 4385 constructs a `T` in it with `new( storage ) T( _value )`, so the buffer is deliberately filled by the object it holds and is never read as raw chars. Reporting it as uninitialized is a false positive. It now appears only because the PR's lookup change lets `Option` (the base of `LazyStat`) be instantiated." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4388:9: warning: Member variable 'Option < GroupInfo >::storage' is not initialized in the copy constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The PR now resolves `LazyStat : Option` inside namespace Catch, so `Option` gets instantiated and checked. That part is a gain in template understanding. The resulting warning, though, is about `storage`, a raw aligned char buffer used only as backing memory for placement new (`new( storage ) T( *_other )`). Leaving it uninitialized when the Option is empty is the intended design of an optional type. When a value is present, the placement new constructs into it in the initializer list, and nothing ever reads `storage` directly. Users cannot sensibly fix this, so it is effectively a new false positive / noise." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4388:9: warning: Member variable 'Option < TestCaseInfo >::storage' is not initialized in the copy constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "The PR now instantiates Catch's `Option`, which exposes this new warning. `storage` is a raw aligned char buffer that exists only as backing memory for placement new. The copy constructor constructs the value into it with `new( storage ) T( *_other )` when `_other` holds a value. When it does not, the buffer is intentionally left untouched and never read, because all access goes through `nullableValue`. Asking the user to initialize this buffer is noise, effectively a false positive, so this added warning is a regression even though the better template lookup is behind it." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:4388:9: warning: Member variable 'Option < TestRunInfo >::storage' is not initialized in the copy constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "With this PR, Cppcheck now instantiates `Option` (through `LazyStat : Option`), so it reports on this class for the first time. `storage` is a raw aligned byte buffer used only as placement-new storage. The copy constructor constructs the `T` into `storage` when `_other` is set. When `_other` is empty, `nullableValue` is null and `storage` is never read, so leaving it uninitialized is intentional and correct. The warning that `storage` is not initialized in the copy constructor is therefore a false positive added by the PR, even though it comes from better template instantiation." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:5480:19: warning: The struct 'LazyStat < GroupInfo >' defines member function with name 'operator=' also defined in its parent class 'Option < GroupInfo >'. [duplInheritedMember]\n dolfinx-master/cpp/test/unit/catch/catch.hpp:4404:17: note: Parent function 'Option < GroupInfo >::operator='\n dolfinx-master/cpp/test/unit/catch/catch.hpp:5480:19: note: Derived function 'LazyStat < GroupInfo >::operator='" ], "verdict": { "verdict": "improvement", "confidence": "low", "explanation": "The PR changes how template names are looked up. `Option` used as the base of `LazyStat` is now resolved to `Catch::Option`, so `Option` is instantiated and its members are known. The `duplInheritedMember` check then sees that `LazyStat::operator=(T const&)` has the same name as `Option::operator=(T const&)`. That is factually true: the derived operator hides the base one. Cppcheck would report the same for equivalent non-template code. The hiding is intentional here, since the derived operator calls the base version and resets `used`, and assignment operators are hidden by the implicit copy assignment anyway. So the warning is pedantic rather than wrong. Overall it reflects better understanding of the templates, not a misanalysis, but its practical value is debatable." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:5480:19: warning: The struct 'LazyStat < TestCaseInfo >' defines member function with name 'operator=' also defined in its parent class 'Option < TestCaseInfo >'. [duplInheritedMember]\n dolfinx-master/cpp/test/unit/catch/catch.hpp:4404:17: note: Parent function 'Option < TestCaseInfo >::operator='\n dolfinx-master/cpp/test/unit/catch/catch.hpp:5480:19: note: Derived function 'LazyStat < TestCaseInfo >::operator='" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`LazyStat` derives from `Catch::Option`. Its non-virtual `operator=(T const&)` and `reset()` hide the base functions with the same names. The base versions are declared at line 4404 and line 4410.\n\nWith the PR, the template simplifier now resolves `Option` inside the `LazyStat` instantiation to `Catch::Option` and instantiates `Option`. That gives Cppcheck the base-class information it was missing, so `duplInheritedMember` can now see that the derived class redefines base members.\n\nThe hiding does exist, so this is a correct `duplInheritedMember` finding, although it is intentional: the derived functions call the base versions. The new warning comes from better template understanding rather than a misparse." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:5480:19: warning: The struct 'LazyStat < TestRunInfo >' defines member function with name 'operator=' also defined in its parent class 'Option < TestRunInfo >'. [duplInheritedMember]\n dolfinx-master/cpp/test/unit/catch/catch.hpp:4404:17: note: Parent function 'Option < TestRunInfo >::operator='\n dolfinx-master/cpp/test/unit/catch/catch.hpp:5480:19: note: Derived function 'LazyStat < TestRunInfo >::operator='" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "With this PR, `Option` is now instantiated as the base of `LazyStat`. Before, the template simplifier failed to resolve the base, so `Option` was never instantiated and no warnings about it appeared. Now Cppcheck sees the real class hierarchy. `LazyStat::operator=(T const&)` has the same name and signature as the non-virtual `Option::operator=(T const&)` (line 4404) and hides it. That is exactly the pattern `duplInheritedMember` reports. The hiding is intentional (the derived version calls the base), but the warning is factually correct and comes from Cppcheck understanding the code better." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:5485:14: warning: The struct 'LazyStat < GroupInfo >' defines member function with name 'reset' also defined in its parent class 'Option < GroupInfo >'. [duplInheritedMember]\n dolfinx-master/cpp/test/unit/catch/catch.hpp:4410:14: note: Parent function 'Option < GroupInfo >::reset'\n dolfinx-master/cpp/test/unit/catch/catch.hpp:5485:14: note: Derived function 'LazyStat < GroupInfo >::reset'" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`LazyStat` derives from `Option`. Both are templates in namespace Catch. With the PR, the template simplifier now resolves and instantiates `Option` from the base-class use inside `LazyStat`, so the inheritance check can see the parent class. Catch's `Option::reset()` is non-virtual, and `LazyStat::reset()` hides it. That is exactly what duplInheritedMember reports. The hiding has a real effect: a call through an `Option&` would not clear `used`. So the warning is accurate, even if the hiding is intentional. It appears because Cppcheck now understands the templates better." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:5485:14: warning: The struct 'LazyStat < TestCaseInfo >' defines member function with name 'reset' also defined in its parent class 'Option < TestCaseInfo >'. [duplInheritedMember]\n dolfinx-master/cpp/test/unit/catch/catch.hpp:4410:14: note: Parent function 'Option < TestCaseInfo >::reset'\n dolfinx-master/cpp/test/unit/catch/catch.hpp:5485:14: note: Derived function 'LazyStat < TestCaseInfo >::reset'" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "With the PR, the base `Option` used inside `Catch::LazyStat` is now resolved to the `Catch::Option` template and instantiated for `TestCaseInfo`. Cppcheck therefore now sees the inheritance relationship. `Option::reset()` at line 4410 is a non-virtual member, and `LazyStat` declares its own `reset()`, which hides it. That is exactly what duplInheritedMember is meant to report. The note locations are correct. Catch's hiding is intentional, since the derived `reset()` calls the parent one, but the warning is factually accurate. It is a newly found true positive that comes from better template resolution." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/d/dolfinx/dolfinx_2019.2.0~git20210130.c14cb0a.orig.tar.gz", "your dolfinx-master/cpp/test/unit/catch/catch.hpp:5485:14: warning: The struct 'LazyStat < TestRunInfo >' defines member function with name 'reset' also defined in its parent class 'Option < TestRunInfo >'. [duplInheritedMember]\n dolfinx-master/cpp/test/unit/catch/catch.hpp:4410:14: note: Parent function 'Option < TestRunInfo >::reset'\n dolfinx-master/cpp/test/unit/catch/catch.hpp:5485:14: note: Derived function 'LazyStat < TestRunInfo >::reset'" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "With the PR, Cppcheck now instantiates `Catch::Option` as the base of `LazyStat`, so the template simplifier resolves this code better. `LazyStat::reset()` is a non-virtual member that hides `Option::reset()` (line 4410). That is exactly the pattern `duplInheritedMember` reports, so the message is factually correct. The hiding looks intentional, since the derived `reset()` calls the base `reset()` and then clears `used`, but it is still a legitimate style finding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/murasaki/murasaki_1.68.6.orig.tar.gz", "your murasaki/src/itree.h:348:15: style:inconclusive: Technically the member function 'Itree::itree_range_iterator < int , AnchorSet * >::range_next_in' can be const. [functionConst]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`range_next_in` only reads the members `_M_header` and `target` and changes nothing but local variables. It could therefore be declared const, so the inconclusive functionConst warning looks like a true positive. This assumes `target.overlaps` is a const member function, which is not shown. The warning appears now because the PR resolves template names inside the `Itree` namespace better, so `itree_range_iterator` gets instantiated with concrete types and checked. Better template understanding that yields a valid new finding is an improvement." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/murasaki/murasaki_1.68.6.orig.tar.gz", "your murasaki/src/itree.h:348:15: style:inconclusive: Technically the member function 'Itree::itree_range_iterator < long , Anchor * >::range_next_in' can be const. [functionConst]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`range_next_in` only reads the members `_M_header` and `target`. It walks the tree through local pointer copies (`__x`, `__y`, `__z`) and returns one of them; it never assigns to `_M_node`, `target` or `_M_header`. So it could be declared const, and the inconclusive functionConst warning is valid. The PR fixes lookup of templates inside namespaces and nested scopes, so this class template in namespace `Itree` is now instantiated for `` and checked. This is a new true positive from better template understanding. The one unverified point is whether `target.overlaps()` is a const member; Cppcheck normally checks that before warning." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/m/murasaki/murasaki_1.68.6.orig.tar.gz", "your murasaki/src/itree.h:348:15: style:inconclusive: Technically the member function 'Itree::itree_range_iterator < long , long >::range_next_in' can be const. [functionConst]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`range_next_in` only reads the members `_M_header` and `target` (`target.stop`, `target.start`, `target.overlaps(...)`) and returns a local pointer. It never assigns to a member, so it can technically be const, as long as `overlaps` is a const method, which is typical for a range type. The warning is not shown in main, probably because main did not instantiate this class template. With the PR's improved template declaration lookup, the instantiations are now created and checked. That gives a plausible true positive (inconclusive style), although it is reported once per instantiation." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1522:3: warning: Member variable 'Value::int_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "Line 1522 expands to a `MakeValue` constructor whose body calls `set_string(value)`. In fmt, `Value`'s members (`int_value`, `string`, `wstring`, \u2026) live in a union, so `set_string` writing `wstring` already initializes the storage. Leaving `int_value` unset is not a bug. The PR changes template instantiation so that `MakeValue` now gets instantiated, and cppcheck then reports every other union member as uninitialized. That is a new false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1522:3: warning: Member variable 'Value::long_long_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "high", "explanation": "Line 1522 expands to a `MakeValue` constructor that calls `set_string(value)`, which fills the `wstring` member. In fmt, `Value` holds these fields in an anonymous union, so writing one member initializes the storage. `long_long_value` and the other members are alternatives, not separate fields. The new warning that `Value::long_long_value` is not initialized is therefore a false positive. It also lists `wstring`, the member that is actually set. The warning appears only because the PR now instantiates this class template differently, so it exposes a false positive rather than a real bug." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1523:3: warning: Member variable 'Value::double_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "In fmt's `MakeValue`, which derives from `Arg`/`Value`, the wide-string constructor calls `set_string(value)`. That writes the `wstring` member of the `Value` union. `Value` is a union, so writing one member is enough: `double_value` and the other alternatives are not separate fields that need initialising. The new warning claiming `Value::double_value` is uninitialized is a false positive. It is repeated for every union member and comes from the PR's changed template instantiation, so it is noise for users." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1523:3: warning: Member variable 'Value::long_double_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "high", "explanation": "In fmt, `MakeValue` derives from `Arg`/`Value`, and all of `Value`'s data members (`int_value`, `long_double_value`, `wstring`, ...) live in an anonymous union. The `FMT_MAKE_WSTR_VALUE` constructor calls `set_string(value)`, which sets the active union member `wstring`. A union needs only one member initialized, so saying `long_double_value` is uninitialized is a false positive. The warning appears only with the PR, together with many similar new `uninitDerivedMemberVar` lines and a new 'Failed to instantiate template' debug message in the same file. This points to the changed template-scope lookup mis-instantiating these fmt templates, so Cppcheck now understands the code worse." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1523:3: warning: Member variable 'Value::string' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`Value` keeps `int_value`, `string`, `wstring`, `custom` and the others in one anonymous union. The `MakeValue` constructor at line 1523 calls `set_string(value)`, which writes the active union member. Setting one member of a union is enough, so reporting `Value::string` (and every other union member) as uninitialized is a false positive. The PR now instantiates more of the wchar_t-related templates, which exposes this false positive. The same run also adds a new templateInstantiation debug message, so the new output reflects noise rather than a real defect." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1524:3: warning: Member variable 'Value::long_double_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "high", "explanation": "The PR makes Cppcheck instantiate `MakeValue` templates it did not instantiate before, and this produces a new `uninitDerivedMemberVar` warning. The warning is a false positive. In fmt, `Value` holds `int_value`, `long_double_value`, `wstring` and the others in an anonymous union. The `MakeValue(const std::wstring &)` constructor calls `set_string(value)`, which sets the `wstring` member, so the union is initialized. Reporting every other union member (here `long_double_value`) as uninitialized is wrong." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1524:3: warning: Member variable 'Value::long_long_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "Line 1524 expands to the `MakeValue(const std::wstring&)` constructor, whose body calls `set_string(value)`, which writes the `wstring` member. In fmt 4.x, `Value`'s data members (`int_value`, `long_long_value`, `wstring`, etc.) live in an anonymous union, so they share storage and only one of them needs to be set. Reporting `long_long_value` as uninitialized is therefore a false positive. It appears only because the PR's template lookup changes now instantiate this class differently. The same diff also adds a new 'Failed to instantiate template' debug message in this file." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1531:3: warning: Member variable 'Value::double_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "In fmt's bundled format.h, `MakeValue` derives from `Arg`/`Value`, whose members (`int_value`, `double_value`, `wstring`, \u2026) live in an anonymous union. The `MakeValue(WStringRef)` constructor calls `set_string(value)`, which writes the `wstring` member of that union, so the object is initialized. A union never needs every member set. The warning is a false positive: it even lists `wstring`, which the constructor does set. It appears only because the PR changes template instantiation so that this `MakeValue` instantiation is now checked. The same run also shows a new `templateInstantiation` debug message for `IntFormatSpec`, a further sign that template handling got worse here." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1531:3: warning: Member variable 'Value::pointer' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "high", "explanation": "The warning is a new false positive. Line 1531 expands to `MakeValue(WStringRef value) { set_string(value); }`. `set_string` writes the `wstring` member of `Value`'s anonymous union, and writing one union member initializes the union. Reporting `Value::pointer` (and every other union member) as uninitialized is wrong. This batch of new uninitDerivedMemberVar warnings, together with the new templateInstantiation debug message in the same file, points to the template simplifier now instantiating `MakeValue` differently. Cppcheck understands this code worse than before." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1531:3: warning: Member variable 'Value::uint_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "In fmt, `Value` holds its members (`int_value`, `uint_value`, `wstring`, ...) in an anonymous union. The `MakeValue(WStringRef)` constructor from `FMT_MAKE_WSTR_VALUE` calls `set_string(value)`, which fills the `wstring` member. Since the members share storage, it is wrong to report `uint_value` as uninitialized. The PR changed template lookup so `MakeValue` now gets instantiated (or instantiated differently), which exposes this false positive. The same batch also adds a new `templateInstantiation` debug message, so template handling got worse here." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1531:3: warning: Member variable 'Value::ulong_long_value' is not initialized in the constructor. Maybe it should be initialized directly in the class Value? [uninitDerivedMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "high", "explanation": "Line 1531 expands to `MakeValue(WStringRef value) { set_string(value); }`, and `set_string` fills `wstring.value` and `wstring.size`. In fmt, `Value`'s data members (`int_value`, `ulong_long_value`, `wstring`, \u2026) are members of a union, so setting one of them is enough. Warning that `ulong_long_value` is not initialized is therefore a false positive. It appears now only because the PR causes this template to be instantiated (likely for wchar_t), and the uninitDerivedMemberVar check mishandles the union members. It is a new false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1705:8: style: The member function 'fmt::ArgVisitor < fmt :: internal :: ArgConverter < void > , void >::report_unhandled_arg' can be static. [functionStatic]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`ArgVisitor::report_unhandled_arg()` has an empty body and never uses `this`, so it could be static. The CRTP call `static_cast(this)->report_unhandled_arg()` would still compile if it were. `ArgConverter` is a real instantiation: printf.h calls `convert_arg`. The PR's improved template lookup now instantiates this base, so Cppcheck reports a correct (if stylistically debatable) functionStatic finding it previously missed. This is a new true positive, though the CRTP design makes it a low-value style hint." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:2830:21: debug: Failed to instantiate template \"IntFormatSpec\". The checking continues anyway. [templateInstantiation]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "Line 2830 uses `IntFormatSpec(value)` inside the class template `BasicWriter`. Both are ordinary templates in namespace `fmt`, so Cppcheck should be able to instantiate it. The PR adds a new debug message saying `IntFormatSpec` could not be instantiated. The PR changes the scope lookup for template names used inside expanded class templates, and that new lookup probably no longer matches this use. Even if the message only shows up because more templates are now expanded within the pass limit, a new templateInstantiation failure means Cppcheck understands this code worse here." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/format.h:563:3: style: Class 'BasicStringRef < wchar_t >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "Line 563 declares the single-argument constructor `BasicStringRef(const Char *s)` without `explicit`, so the noExplicitConstructor finding is factually correct. The implicit conversion is intentional API design, but it matches what the check is meant to report. The new line appears because the PR now instantiates `BasicStringRef` (the `WStringRef` typedef), probably by resolving template names in enclosing scopes better or by needing fewer simplifier passes. Better template instantiation that exposes an accurate finding is a gain, although it largely repeats what is likely already reported for the `char` instantiation." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:108:8: warning: The class 'ArgConverter < long >' defines member function with name 'visit_bool' also defined in its parent class 'ArgVisitor < fmt :: internal :: ArgConverter < long > , void >'. [duplInheritedMember]\n salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1733:10: note: Parent function 'ArgVisitor < fmt :: internal :: ArgConverter < long > , void >::visit_bool'\n salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:108:8: note: Derived function 'ArgConverter < long >::visit_bool'" ], "verdict": { "verdict": "improvement", "confidence": "low", "explanation": "`ArgConverter` derives from `ArgVisitor, void>` and defines `visit_bool(bool)`. The base class (format.h:1733) also defines `visit_bool`, so the derived function really does hide it, and the warning text is accurate. The warning appears now because the PR resolves template names inside class templates better, so `ArgConverter` is instantiated and checked. This is the CRTP visitor pattern, where hiding the base member is intentional. Some users would therefore see this as noise rather than a bug, which keeps confidence low." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:108:8: warning: The class 'ArgConverter < long long >' defines member function with name 'visit_bool' also defined in its parent class 'ArgVisitor < fmt :: internal :: ArgConverter < long long > , void >'. [duplInheritedMember]\n salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1733:10: note: Parent function 'ArgVisitor < fmt :: internal :: ArgConverter < long long > , void >::visit_bool'\n salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:108:8: note: Derived function 'ArgConverter < long long >::visit_bool'" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "ArgConverter derives from ArgVisitor, void>, which is a CRTP base. ArgVisitor's visit_bool/visit_char are default handlers that dispatch statically to the derived class. Redefining visit_bool in ArgConverter is the intended customization point of this design, not an accidental hiding of a parent member. The new duplInheritedMember warning only appears because the PR now instantiates the CRTP base for each ArgConverter specialization (long, long long, short, \u2026). It is technically correct that a same-named function exists in the base, but for this idiom the warning is noise users would have to suppress, so it is effectively a new false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:108:8: warning: The class 'ArgConverter < short >' defines member function with name 'visit_bool' also defined in its parent class 'ArgVisitor < fmt :: internal :: ArgConverter < short > , void >'. [duplInheritedMember]\n salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1733:10: note: Parent function 'ArgVisitor < fmt :: internal :: ArgConverter < short > , void >::visit_bool'\n salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:108:8: note: Derived function 'ArgConverter < short >::visit_bool'" ], "verdict": { "verdict": "regression", "confidence": "low", "explanation": "ArgConverter derives from ArgVisitor, void>, which is the CRTP pattern. ArgVisitor dispatches through static_cast(this)->visit_*, so redefining visit_bool in the derived class is the intended way to customise it, not accidental hiding. The PR makes Cppcheck instantiate ArgConverter and the other specialisations, which exposes this intended shadowing as a new duplInheritedMember warning; six near-identical copies appear, one per instantiation. In the same file a new 'Failed to instantiate template' debug message also appears. The warning is technically accurate but is noise for CRTP code, so it is most likely an unwanted new finding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:113:8: warning: The class 'ArgConverter < long >' defines member function with name 'visit_char' also defined in its parent class 'ArgVisitor < fmt :: internal :: ArgConverter < long > , void >'. [duplInheritedMember]\n salmon-1.10.3/include/spdlog/fmt/bundled/format.h:1738:10: note: Parent function 'ArgVisitor < fmt :: internal :: ArgConverter < long > , void >::visit_char'\n salmon-1.10.3/include/spdlog/fmt/bundled/printf.h:113:8: note: Derived function 'ArgConverter < long >::visit_char'" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "ArgVisitor is a CRTP visitor in fmt. Its non-virtual visit_char is a default that dispatches to Impl via static_cast. ArgConverter is meant to supply its own visit_char, which replaces the default at compile time; that is how CRTP static polymorphism works. Reporting this as duplInheritedMember is noise about intended code, not a real bug. The warning appears only because the PR now instantiates ArgConverter and similar classes differently. The same diff also adds a new 'Failed to instantiate template IntFormatSpec' debug message and many dubious uninitDerivedMemberVar warnings, so the template handling change is not clearly better here. The added warning is effectively a false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/tests/catch.hpp:4411:9: warning: Member variable 'Option < TestCaseInfo >::storage' is not initialized in the constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`Option` is Catch's optional type. `storage` is a raw aligned char buffer (`alignas(alignof(T)) char storage[sizeof(T)]`) that only serves as space for placement-new. The default constructor sets `nullableValue` to nullptr, so `storage` is never read before a T is constructed in it. Leaving it uninitialized is intentional and correct. The PR makes Cppcheck instantiate `Option`, which exposes this class to the check, but the resulting uninitMemberVar warning is noise rather than a real bug. That makes it a new false positive." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/tests/catch.hpp:4412:9: style: Class 'Option < TestRunInfo >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`Option(T const& _value)` is a single-argument constructor that is not marked `explicit`, so the noExplicitConstructor style warning is correct. The PR improves template name lookup, so Cppcheck now instantiates `Option` and checks its members. The implicit conversion may be intended for an optional type, but that is the normal case this style check flags. This is a true positive gained from better template understanding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/tests/catch.hpp:4415:9: warning: Member variable 'Option < TestRunInfo >::storage' is not initialized in the copy constructor. [uninitMemberVar]" ], "verdict": { "verdict": "regression", "confidence": "medium", "explanation": "`Option` is an optional type whose `storage` member is a raw buffer. The copy constructor fills it with placement new (`new(storage) T(*_other)`) when `_other` holds a value. When `_other` is empty, the buffer is never read, because `nullableValue` is nullptr. Leaving the buffer uninitialized is intended, so this uninitMemberVar warning is a false positive. It appears only because the PR now instantiates `Option`. Better template resolution exposed an existing check weakness, but users get a new false warning." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/tests/catch.hpp:5501:19: warning: The struct 'LazyStat < GroupInfo >' defines member function with name 'operator=' also defined in its parent class 'Option < GroupInfo >'. [duplInheritedMember]\n salmon-1.10.3/tests/catch.hpp:4431:17: note: Parent function 'Option < GroupInfo >::operator='\n salmon-1.10.3/tests/catch.hpp:5501:19: note: Derived function 'LazyStat < GroupInfo >::operator='" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`LazyStat` derives from `Option` and declares `operator=(T const&)` and `reset()`. These hide `Option`'s non-virtual `operator=(T const&)` (line 4431) and `reset()` (line 4437); the derived versions call the base ones explicitly. That is exactly the situation duplInheritedMember reports, so the warning is factually correct by the checker's definition. The hiding is intentional, so its practical value is limited. It appears now because the PR's improved template-name lookup lets cppcheck instantiate `Option` and `LazyStat`, so these classes are analysed rather than skipped. This is a true positive gained from better template understanding." } }, { "key": [ "https://ftp.debian.org/debian/pool/main/s/salmon/salmon_1.10.3+ds1.orig.tar.xz", "your salmon-1.10.3/tests/catch.hpp:5506:14: warning: The struct 'LazyStat < TestRunInfo >' defines member function with name 'reset' also defined in its parent class 'Option < TestRunInfo >'. [duplInheritedMember]\n salmon-1.10.3/tests/catch.hpp:4437:14: note: Parent function 'Option < TestRunInfo >::reset'\n salmon-1.10.3/tests/catch.hpp:5506:14: note: Derived function 'LazyStat < TestRunInfo >::reset'" ], "verdict": { "verdict": "improvement", "confidence": "medium", "explanation": "`LazyStat` derives from `Catch::Option`, and both define a non-virtual `reset()`, so the derived `reset()` hides the base one. That is exactly what duplInheritedMember reports, so the warning is technically correct, even though the hiding is intentional (the derived `reset()` calls `Option::reset()`). The PR fixes how the scope of template names used inside class templates is resolved. As a result, `Option` is now instantiated as the base of `LazyStat`, and Cppcheck sees the inheritance relationship. This is a true positive found because Cppcheck understands the templates better." } } ], "started": "2026-11-29 16:55:59 UTC", "runner": "aws-testrunner-2" }