AI review of 2026-11-06_18-36-18-fdecd439cec8-results.txt PR: #8997 https://github.com/cppcheck-opensource/cppcheck/pull/8997 Tested: fdecd439cec8f154eec59b0ac6348c407455d749 Merge base: a7b9e1cc22dd4d6f345dfec61d6172bb3253bad2 Reviewed: 2026-11-07 12:06:43 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 56 in the report (random sample) Verdicts: 50 improvement Tokens: 351800 input, 214816 cache read, 4384 cache write, 36909 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/libg/libgig/libgig_4.6.0.orig.tar.bz2 Result: main libgig-4.6.0/src/gig.h:272:16: warning: Member variable 'leverage_ctrl_t::type' has no initializer. [uninitMemberVarNoCtor] Explanation: `leverage_ctrl_t` is a plain aggregate. It has no constructor, and neither `type` nor `controller_number` has a default member initializer. The uninitMemberVarNoCtor check is only meant to fire when some members are self-initialized and others are not. In main, something else in the struct, most likely a static member produced by the GIG_DECLARE_ENUM macro, was counted as 'initialized', so `hasAnySelfInit` was set. The PR now classifies static members as `Initialization::None` rather than initialized, so that no longer happens. The warning on a pure aggregate struct was a false positive, and removing it is correct. ---- 2 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libg/libgig/libgig_4.6.0.orig.tar.bz2 Result: main libgig-4.6.0/src/gig.h:273:16: warning: Member variable 'leverage_ctrl_t::controller_number' has no initializer. [uninitMemberVarNoCtor] Explanation: `leverage_ctrl_t` is a plain aggregate with no constructor. Neither `type` nor `controller_number` has a default member initializer. `uninitMemberVarNoCtor` is meant for classes where some members have in-class initializers and others do not. That is not the case here. Main most likely reported the warning because something from the `GIG_DECLARE_ENUM` expansion, probably a static or anonymous entity, was counted as an "initialized" member and set `hasAnySelfInit`. The PR now classifies static and anonymous members as `None` instead of `Initialized`, so they no longer trigger the warning for the other members. Removing this false positive on a POD struct is an improvement. ---- 3 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:566:7: warning: Member variable 'CSoundFile::ChnMix' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();`), and none of its members has an in-class initializer, so an uninitMemberVarNoCtor warning for 'ChnMix' is wrong. In main, isInitialized() returned true for static members, so the many `static UINT ...` members falsely set hasAnySelfInit. That triggered noCtor warnings for every plain member. The PR now returns Initialization::None for static members, so they no longer count as self-initialized, and this false positive is gone. ---- 4 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:567:16: warning: Member variable 'CSoundFile::Ins' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile has no default member initializers; its only other members are static. It also declares its own constructor, CSoundFile(). In main, isInitialized() returned true for static members, so the static UINT members set hasAnySelfInit. That made Cppcheck report uninitMemberVarNoCtor for every non-static member, including 'Ins'. The PR returns Initialization::None for static members, so they no longer count as self-initialized and the bogus warnings disappear. The warning was a false positive: there is no partial in-class initialization, and the class has a user-declared constructor, so 'no initializer' does not apply. ---- 5 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:568:20: warning: Member variable 'CSoundFile::Headers' has no initializer. [uninitMemberVarNoCtor] Explanation: `CSoundFile` declares a constructor `CSoundFile();`, and none of its non-static members has an in-class initializer. The `uninitMemberVarNoCtor` warning, which targets classes with partial default member initializers and no constructor, does not fit this code. In main, `isInitialized()` returned true for static members, so the many `static UINT ...` members wrongly set `hasAnySelfInit`. That triggered a no-constructor warning for every member, including `Headers`. The PR returns `Initialization::None` for static members, so they no longer count as self-initialized, and these false positives disappear. ---- 6 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:569:21: warning: Member variable 'CSoundFile::ChnSettings' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so a 'no constructor / no initializer' warning for its members is a false positive. Cppcheck apparently misparsed the class (likely the unknown MODPLUG_EXPORT macro), and it even reported member functions such as ReadInstrumentFromSong as variables. In main the warnings were triggered because static members made `isInitialized` return true, which counted as 'has a self-initialized member'. The PR now returns `Initialization::None` for static members, so they no longer set that flag. Removing this false positive is an improvement. ---- 7 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:570:14: warning: Member variable 'CSoundFile::Patterns' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();`) and has no in-class initializers, so an uninitMemberVarNoCtor warning for `Patterns` makes no sense. Main probably reached this check because the many static members were counted as 'initialized' by the old isInitialized(), which set hasAnySelfInit. With the PR, static members return Initialization::None, so they no longer trigger the no-constructor warnings. All 54 removed warnings, including this one, were false positives. ---- 8 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:571:7: warning: Member variable 'CSoundFile::PatternSize' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so the 'no constructor' warning `uninitMemberVarNoCtor` does not fit this class. In main, the warning was triggered because static members (m_nXBassDepth etc.) were treated as 'initialized'. That set hasAnySelfInit and flagged every other member, including PatternSize. The PR makes static members return Initialization::None, so they no longer count as self-initialization, and the bogus warnings disappear. This removes a false positive. ---- 9 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:572:7: warning: Member variable 'CSoundFile::Order' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so a warning saying `Order` has no initializer because there is no constructor is wrong. The warning was triggered because the old code treated the static members as 'initialized', which set hasAnySelfInit and flagged every non-static member. The PR classifies static members as Initialization::None, so they no longer trigger the no-ctor check. Removing this false positive (and its siblings, including the bogus ones at lines 774–775) is an improvement. ---- 10 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:573:13: warning: Member variable 'CSoundFile::m_MidiCfg' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor, `CSoundFile();`, at line 594, so a 'no constructor / has no initializer' warning (uninitMemberVarNoCtor) does not fit this class. Main probably reached this path because the class was misparsed. The bogus members 'ReadInstrumentFromSong' and 'ReadSampleFromSong' at lines 774/775 point to that. The many static members then counted as 'self-initialized' under the old isInitialized(), which set hasAnySelfInit and triggered warnings for every non-static member. The PR stops counting static members as initialized (it returns None). That removes this whole batch of spurious warnings, including the one for m_MidiCfg. Losing it is good because the class really has a user-declared constructor. ---- 11 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:574:15: warning: Member variable 'CSoundFile::m_MixPlugins' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor `CSoundFile();`, so the 'no constructor' premise of uninitMemberVarNoCtor is wrong. The warning appeared only because Cppcheck misparsed the class, probably due to the unknown `MODPLUG_EXPORT` macro. The flagged 'members' at lines 774-775 are actually functions, which confirms the misparse. In libmodplug the constructor also clears members such as m_MixPlugins with memset. Removing this batch of warnings removes false positives. ---- 12 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:575:24: warning: Member variable 'CSoundFile::m_nDefaultTempo' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so `uninitMemberVarNoCtor` ("has no initializer", meant for classes without constructors) does not fit `m_nDefaultTempo`. Cppcheck apparently misparsed the class: it also reports `ReadInstrumentFromSong` and `ReadSampleFromSong` as member variables. No member of the class has an in-class initializer. The warning most likely fired because main's isInitialized() returned true for static members, so the many `static UINT ...` members falsely counted as self-initialized (hasAnySelfInit). The PR now returns None for statics, so they no longer trigger the warning for the other members. This removes a false positive. ---- 13 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:575:41: warning: Member variable 'CSoundFile::m_nDefaultGlobalVolume' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor, `CSoundFile();` at line 594, so an uninitMemberVarNoCtor warning ('has no initializer' for a class without a constructor) is wrong for its members. Cppcheck evidently misparsed the class, most likely because of the MODPLUG_EXPORT macro; it even reported functions such as ReadInstrumentFromSong as member variables. The no-constructor check only fires when some member has a self-initializer. In main, static members (e.g. m_nXBassDepth) were treated as 'initialized', which wrongly set hasAnySelfInit. The PR classifies static members as 'None', so this spurious trigger is gone and the false positives, including m_nDefaultGlobalVolume, disappear. ---- 14 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:575:7: warning: Member variable 'CSoundFile::m_nDefaultSpeed' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so the 'no constructor' premise of uninitMemberVarNoCtor is wrong here. Cppcheck apparently misparsed the class: `class MODPLUG_EXPORT CSoundFile` uses an export macro, and it also reported member functions such as ReadInstrumentFromSong as variables. On main, the many static members were treated as 'initialized', which set hasAnySelfInit and triggered the noCtor warnings. The PR now treats static members as None, so they no longer trigger the warning for the other members. Removing this false positive on m_nDefaultSpeed is an improvement. ---- 15 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:576:8: warning: Member variable 'CSoundFile::m_dwSongFlags' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();`, defined elsewhere), so the 'no constructor, member has no initializer' warning does not fit this class. Cppcheck apparently misparsed the class, since it also reported function declarations at lines 774/775 as member variables. The noCtor check only fires when some member has a default member initializer. In main, the static members (m_nXBassDepth etc.) were counted as 'initialized', which wrongly turned the check on. The PR classifies static members as Initialization::None, so the check no longer fires. Removing the m_dwSongFlags warning removes a false positive. ---- 16 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:577:20: warning: Member variable 'CSoundFile::m_nMixChannels' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor, `CSoundFile();`, so a 'has no initializer [uninitMemberVarNoCtor]' warning does not fit this class; the constructor defined in the .cpp is responsible for initialization. Main also flags `ReadInstrumentFromSong` and `ReadSampleFromSong` as member variables, which suggests Cppcheck had misparsed the class. In main, the no-constructor check fired because `isInitialized()` returned true for the many static members. That set `hasAnySelfInit`, which made Cppcheck treat this as a class with in-class initializers. The PR makes static members return `Initialization::None` instead of `Initialized`, so they no longer trigger this. Removing this false positive is an improvement. ---- 17 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:577:36: warning: Member variable 'CSoundFile::m_nMixStat' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so a 'no constructor' warning (uninitMemberVarNoCtor) for m_nMixStat was wrong to begin with. Cppcheck apparently misparsed the class: it also reported functions such as ReadInstrumentFromSong as member variables. In the no-constructor path this warning is only given when some member has an initializer (hasAnySelfInit). In main, the many static members (m_nXBassDepth etc.) counted as 'initialized' and set hasAnySelfInit. The PR returns Initialization::None for static members, so hasAnySelfInit stays false and the spurious warnings go away. Removing this false positive is an improvement. ---- 18 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:577:48: warning: Member variable 'CSoundFile::m_nBufferCount' has no initializer. [uninitMemberVarNoCtor] Explanation: `CSoundFile` declares a user constructor (`CSoundFile();` at line 594), and none of its non-static members has a default member initializer. An `uninitMemberVarNoCtor` warning ("has no initializer") is therefore a false positive. The warning was most likely triggered because main's `isInitialized()` returned true for static members, so the many `static UINT ...` members counted as "self-initialized" (`hasAnySelfInit`). That made Cppcheck flag every other member. The PR returns `Initialization::None` for static members, so they no longer trigger this, and the whole batch of false warnings for `m_nBufferCount` and the others disappears. Some reported 'members' are even functions (`ReadInstrumentFromSong`, lines 774-775), which further shows these were spurious. ---- 19 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:577:7: warning: Member variable 'CSoundFile::m_nChannels' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares its own constructor `CSoundFile();` and has no in-class member initializers. The only members that main treated as 'self-initialized' were the static members: the old isInitialized() returned true for statics, so hasAnySelfInit was set and every non-static member got an uninitMemberVarNoCtor warning. The PR makes static members return Initialization::None, so they no longer trigger the warning. The removed warning for m_nChannels was a false positive. ---- 20 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:578:28: warning: Member variable 'CSoundFile::m_nInstruments' has no initializer. [uninitMemberVarNoCtor] Explanation: `CSoundFile` declares a constructor (`CSoundFile();` at line 594), so `uninitMemberVarNoCtor` ("has no initializer") does not apply. Main probably took the no-constructor path anyway. The members flagged at lines 774–775 suggest Cppcheck misparsed the class. On that path, main's `isInitialized()` returned true for static members. The many `static` members (`m_nXBassDepth`, etc.) therefore set `hasAnySelfInit`, which made every non-static member look like it lacked a default member initializer. The PR returns `Initialization::None` for static members, so they no longer count as self-initialized. This removes the bogus warning for `m_nInstruments`, a false positive. ---- 21 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:578:7: warning: Member variable 'CSoundFile::m_nType' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile has no default member initializers, and it even declares a constructor `CSoundFile();`. So the uninitMemberVarNoCtor warning for m_nType (and every other member) is a false positive. In main, the static members (m_nXBassDepth etc.) made isInitialized() return true, which set hasAnySelfInit and triggered warnings for all the plain members. The PR returns Initialization::None for static members, so they no longer count as self-initialized and the bogus warnings go away. ---- 22 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:579:36: warning: Member variable 'CSoundFile::m_nPatternDelay' has no initializer. [uninitMemberVarNoCtor] Explanation: `CSoundFile` actually declares a constructor (`CSoundFile();`), so `uninitMemberVarNoCtor` does not apply to it. Cppcheck evidently misparsed the class: it also reports functions such as `ReadInstrumentFromSong` as member variables. In main, the static members (`m_nXBassDepth` etc.) counted as "initialized", so `hasAnySelfInit` was set and every non-static member, including `m_nPatternDelay`, got a no-initializer warning. With the PR, static members return `Initialization::None` and no longer trigger the warning. The removed warning was a false positive. ---- 23 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:579:53: warning: Member variable 'CSoundFile::m_nFrameDelay' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();`), so 'has no initializer' (uninitMemberVarNoCtor) does not fit here. None of the non-static members has a default member initializer either. Main reported these warnings because static members (m_nXBassDepth etc.) counted as 'initialized'. That set hasAnySelfInit and flagged every plain member. The PR returns None for static members, so they no longer trigger the warning. Removing this false positive on m_nFrameDelay is correct. ---- 24 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:579:7: warning: Member variable 'CSoundFile::m_nTickCount' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a user constructor, `CSoundFile();`, at line 594. Its members are presumably initialized in the .cpp file. So the no-constructor check `uninitMemberVarNoCtor` should not fire for this class at all. Main's warnings, including ones for lines 774/775 that look like misparsed declarations, appear to come from a member being wrongly treated as self-initialized; that set `hasAnySelfInit` and triggered warnings for every plain member. The PR now counts only truly initialized members for `hasAnySelfInit`, which removes these false positives. ---- 25 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:580:22: warning: Member variable 'CSoundFile::m_nMusicTempo' has no initializer. [uninitMemberVarNoCtor] Explanation: `uninitMemberVarNoCtor` is meant for classes without a constructor where some members have in-class initializers and others do not. `CSoundFile` has no in-class initializers at all; it only has static members. The old `isInitialized()` returned true for static members, so `hasAnySelfInit` was wrongly set and every non-static member, including `m_nMusicTempo`, was reported. The class also declares `CSoundFile();`, so a "no constructor" warning is wrong anyway. The PR returns `Initialization::None` for static members, which removes this false positive. ---- 26 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:580:7: warning: Member variable 'CSoundFile::m_nMusicSpeed' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a user constructor (`CSoundFile();` at line 594), so a uninitMemberVarNoCtor ('has no initializer') warning for m_nMusicSpeed is misplaced. In main, the static members (m_nXBassDepth etc.) made `isInitialized` return true, which set hasAnySelfInit and triggered the no-constructor check for every member. The PR returns `Initialization::None` for static members, so they no longer count as self-initialized. The whole batch of spurious warnings disappears, including odd ones like 'ReadInstrumentFromSong'. Whether members are initialized is a question for the real constructor, not this check. Removing this warning removes a false positive. ---- 27 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:581:19: warning: Member variable 'CSoundFile::m_nRow' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a user-provided constructor, CSoundFile(), which is defined elsewhere. So an uninitMemberVarNoCtor ('has no initializer') warning on m_nRow does not fit. On main, the class was treated as having some self-initialized member only because static members (m_nXBassDepth etc.) counted as 'initialized'. That triggered no-ctor warnings for every plain member. The PR classifies static members as Initialization::None, so they no longer set hasAnySelfInit, and this false positive disappears. ---- 28 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:581:27: warning: Member variable 'CSoundFile::m_nNextStartRow' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so a 'no constructor / has no initializer' warning for its members does not fit this class. Main presumably reached the uninitMemberVarNoCtor path because Cppcheck misparsed the class. Lines 774–775, which look like member functions, are also reported as member variables, which supports that. Within that path, main counted the class's many static members as 'initialized', which set hasAnySelfInit and triggered warnings for every non-static member. The PR stops counting static members as self-initialized (they now return None), so this batch of spurious warnings, including m_nNextStartRow, disappears. This removes a false positive. ---- 29 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:581:7: warning: Member variable 'CSoundFile::m_nNextRow' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile has no default member initializers on its non-static members. It also declares a constructor, CSoundFile(), which is defined elsewhere. In main, the static members (m_nXBassDepth etc.) were treated as 'initialized' by isInitialized(). That set hasAnySelfInit, so main flagged every plain member such as m_nNextRow with uninitMemberVarNoCtor ('has no initializer'). With the PR, static members return Initialization::None, so they no longer count as self-initialized members and the warnings disappear. This removes a false positive. ---- 30 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:582:18: warning: Member variable 'CSoundFile::m_nCurrentPattern' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor, `CSoundFile();`, and the class has no in-class member initializers. The only thing that made main think the class had "self-initialized" members was its many `static` members, which the old isInitialized() counted as initialized. That set hasAnySelfInit and triggered uninitMemberVarNoCtor for every non-static member, including m_nCurrentPattern. The PR classifies static members as Initialization::None, so they no longer trigger the no-constructor check. The removed warning was a false positive, so removing it is an improvement. ---- 31 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:582:36: warning: Member variable 'CSoundFile::m_nNextPattern' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), which is defined out of line, so an uninitMemberVarNoCtor warning on m_nNextPattern does not fit this class. The warning was apparently triggered because the class has many static members (lines 542-562). Main's isInitialized() returned true for static members, which set hasAnySelfInit and enabled the no-constructor check. The PR now returns Initialization::None for static members, so they no longer count as in-class initializers. The whole batch of bogus warnings, including this false positive, disappears. ---- 32 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:582:51: warning: Member variable 'CSoundFile::m_nRestartPos' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so an uninitMemberVarNoCtor warning ('has no initializer', which is meant for classes without constructors) does not fit this code. Cppcheck apparently misparsed the class: lines 774-775 report `ReadInstrumentFromSong` and `ReadSampleFromSong` as member variables. The noCtor check only fires when some member is self-initialized. In main, the many static members (lines 542-562) counted as 'initialized', which triggered the warning for every member. The PR now classifies static members as `Initialization::None`, so they no longer trigger the check. Removing the warning for m_nRestartPos (and the rest of the batch) removes a false positive. ---- 33 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:582:7: warning: Member variable 'CSoundFile::m_nPattern' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so a 'has no initializer' warning of type uninitMemberVarNoCtor does not fit this class. The warnings were probably triggered because main treated the many static members (lines 542-562) as 'initialized'. That set hasAnySelfInit and enabled the no-constructor check for every other member. With the PR, static members return Initialization::None, so they no longer trigger the check. This removes a whole batch of false positives, including this one for m_nPattern. ---- 34 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:583:7: warning: Member variable 'CSoundFile::m_nMasterVolume' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor, CSoundFile(), defined out of line, so the 'no constructor / no initializer' warning does not fit this class. In main, the warning fired only because the class has many static members (m_nXBassRange, gdwSysInfo, etc.). The old isInitialized() returned true for statics, which wrongly set hasAnySelfInit and made every other member look uninitialized. Static members have no in-class initializer and say nothing about the other members. With the PR they return Initialization::None, so the misleading uninitMemberVarNoCtor flood disappears. Removing this false positive for m_nMasterVolume is an improvement. ---- 35 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:584:22: warning: Member variable 'CSoundFile::m_nTempoFactor' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a user-provided constructor `CSoundFile();` at line 594, so the uninitMemberVarNoCtor check (meant for classes without constructors) should not apply. The whole batch also flagged `ReadInstrumentFromSong` and `ReadSampleFromSong` (lines 774/775), which look like member functions, so Cppcheck evidently misparsed this class. Main probably reported the members because static members were treated as 'initialized', which made the class count as having default member initializers. The PR now classifies static members as Initialization::None, which removes this batch of false positives. ---- 36 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:584:38: warning: Member variable 'CSoundFile::m_nOldGlbVolSlide' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), so an uninitMemberVarNoCtor warning on its plain member `m_nOldGlbVolSlide` is wrong to begin with. Cppcheck appears to have misparsed the class: it also treats `ReadInstrumentFromSong` and `ReadSampleFromSong` as member variables. On main, the many `static` members made `isInitialized` return true, which set `hasAnySelfInit` and triggered the no-constructor warnings for every member. The PR makes static members return `Initialization::None`, so they no longer count as in-class initializers. That removes this whole batch of spurious warnings, so it is a false-positive fix. ---- 37 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:584:7: warning: Member variable 'CSoundFile::m_nFreqFactor' has no initializer. [uninitMemberVarNoCtor] Explanation: `CSoundFile` declares a user-provided constructor `CSoundFile();` (line 594) that is defined elsewhere. A "no constructor, member has no initializer" (uninitMemberVarNoCtor) warning for `m_nFreqFactor` is therefore wrong for this class. Main reported it for every member, plus `ReadInstrumentFromSong` and `ReadSampleFromSong` at lines 774–775, which do not appear to be data members, so these look like misparse-driven false positives. The cause was that static members (lines 544–562) were counted as "initialized", which wrongly set `hasAnySelfInit` and triggered the no-ctor check. With the PR, static members return `Initialization::None`, so they no longer trigger it. Removing these false positives is an improvement. ---- 38 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:585:21: warning: Member variable 'CSoundFile::m_nMaxPeriod' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();`), and none of its non-static members has a default member initializer. So the uninitMemberVarNoCtor warnings were false positives. In main, static members such as `static UINT m_nReverbDelay` were counted as initialized because `isInitialized` returned true for them. That set `hasAnySelfInit` and triggered the no-constructor check. The PR returns `None` for static members, so they no longer count as self-initialized, and the bogus warning for `m_nMaxPeriod` disappears. ---- 39 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:585:35: warning: Member variable 'CSoundFile::m_nRepeatCount' has no initializer. [uninitMemberVarNoCtor] Explanation: The `uninitMemberVarNoCtor` warning is meant for classes without a constructor where some members have default member initializers and others do not. CSoundFile declares a constructor (`CSoundFile();`), and none of its non-static members has an in-class initializer. Main only treated the class as having a 'self-initialized' member because `isInitialized` returned true for the many static members (`m_nReverbDelay`, etc.). The PR returns `Initialization::None` for static members, so they no longer count as initialized and no longer trigger warnings for the other members. The removed warning for `m_nRepeatCount` was a false positive; the member is presumably set in the constructor or via `SetRepeatCount`. ---- 40 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:585:51: warning: Member variable 'CSoundFile::m_nInitialRepeatCount' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor, `CSoundFile();`, at line 594, so an 'uninitMemberVarNoCtor' warning on its members does not fit the code at all. Cppcheck nevertheless took the no-constructor path. That path only warns when some member has a default member initializer (hasAnySelfInit). In main, the old isInitialized() returned true for static members such as `static UINT m_nReverbDelay`, which wrongly counted as a self-initialized member. With the PR, static members return Initialization::None, so hasAnySelfInit is no longer set and the spurious warnings disappear. The removed warnings also include entries like ReadInstrumentFromSong, which look like misparsed member functions rather than real data members. Removing this false positive is an improvement. ---- 41 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:585:7: warning: Member variable 'CSoundFile::m_nMinPeriod' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile has a user-declared constructor (`CSoundFile();` at line 594) and no in-class member initializers, so an uninitMemberVarNoCtor warning for m_nMinPeriod does not fit this code. Main most likely fired because the class has many static members. The old isInitialized() returned true for static variables, which wrongly set hasAnySelfInit and triggered warnings for every plain member. The PR returns None for statics, so they no longer count as self-initialized, and this false positive goes away. ---- 42 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:586:8: warning: Member variable 'CSoundFile::m_nGlobalFadeSamples' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();` at line 594), and none of its non-static members has a default member initializer. The uninitMemberVarNoCtor warning, which targets classes without constructors where some members are self-initialized, does not fit this class. In main, the class's many static members counted as "initialized" and wrongly set hasAnySelfInit. The PR now treats static members as None instead, so this warning and its siblings disappear. Other entries in this batch, such as 'ReadInstrumentFromSong' being reported as a member variable, also show that main's class parsing was confused here. This removes a false positive. ---- 43 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:587:7: warning: Member variable 'CSoundFile::m_nMaxOrderPosition' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile has no in-class default member initializers. Its only 'initialized' members are static ones (m_nProLogicDepth, gdwSysInfo, ...). The class also declares its own constructor `CSoundFile();`. On main, isInitialized() returned true for static members, so the no-constructor path set hasAnySelfInit and then reported every non-static member as having no initializer. The PR makes static members return Initialization::None, so they no longer count as self-initialization, and the bogus warnings go away. m_nMaxOrderPosition is set by the user-declared constructor/Create, so this uninitMemberVarNoCtor was a false positive. ---- 44 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:588:7: warning: Member variable 'CSoundFile::m_nPatternNames' has no initializer. [uninitMemberVarNoCtor] Explanation: `CSoundFile` declares a user constructor (`CSoundFile();`), so `uninitMemberVarNoCtor` ("has no initializer" for a class without a constructor) does not fit this class at all. The members are presumably set in the out-of-line constructor. Main likely raised it because static members such as `m_nProLogicDelay` were treated as "initialized". That made the class look like it uses in-class initialization (`hasAnySelfInit`), so every plain member got flagged. The PR classifies static members as `None` instead of `Initialized`, so these bogus warnings disappear. This is a removed false positive. ---- 45 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:589:28: warning: Member variable 'CSoundFile::m_lpszPatternNames' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a constructor (`CSoundFile();`), so `uninitMemberVarNoCtor` does not fit this class at all. Cppcheck apparently misparsed the class: it also reported the functions `ReadInstrumentFromSong` and `ReadSampleFromSong` as member variables. On main, the warning was triggered because `isInitialized` returned true for the class's many static members, which set `hasAnySelfInit` and made it look like some members had default initializers. The PR returns `Initialization::None` for static members, so they no longer count as self-initialized, and all these warnings disappear. The removed warning on `m_lpszPatternNames` is a false positive, since the real constructor is responsible for initializing it. ---- 46 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:589:8: warning: Member variable 'CSoundFile::m_lpszSongComments' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a user-provided constructor `CSoundFile();` at line 594. A 'no constructor' warning (uninitMemberVarNoCtor) does not fit this class. Main reported it for every member because cppcheck seems to have misparsed the class: lines 774/775 are even reported as member variables. Main also treated the many static members as 'initialized', which set hasAnySelfInit and enabled the warnings. With the PR, static members return Initialization::None instead of Initialized, so they no longer trigger the warnings. The removed warning for m_lpszSongComments was a false positive. ---- 47 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:590:7: warning: Member variable 'CSoundFile::m_szNames' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a user-provided constructor (`CSoundFile();`), and none of its members has a default member initializer. So an uninitMemberVarNoCtor warning for `m_szNames`, or for any other member, does not fit this class. In main, the old isInitialized() returned true for static members, which set hasAnySelfInit. CSoundFile has many static members (gdwSysInfo, m_nMaxMixChannels, ...), so the no-constructor check fired for every non-static member. With the PR, static members return Initialization::None instead of Initialized, so they no longer count as in-class initialization. The spurious warnings disappear. This removes a false positive. ---- 48 / 50 ---- Verdict: IMPROVEMENT (medium confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:591:7: warning: Member variable 'CSoundFile::CompressionTable' has no initializer. [uninitMemberVarNoCtor] Explanation: CSoundFile declares a user-provided constructor `CSoundFile();` at line 594, so 'has no initializer' (uninitMemberVarNoCtor), which is meant for classes without a constructor, does not fit. Main treated static members (m_nStreamVolume, gdwSysInfo, etc.) as 'self-initialized', which set hasAnySelfInit and triggered no-ctor warnings for every other member. The PR returns None for static members, so these spurious warnings, including the one for CompressionTable, are removed. This is a false positive removed. ---- 49 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:774:7: warning: Member variable 'CSoundFile::ReadInstrumentFromSong' has no initializer. [uninitMemberVarNoCtor] Explanation: Line 774 declares a member function, `BOOL ReadInstrumentFromSong(UINT, CSoundFile *, UINT);`, not a data member. Main misparsed it as a variable and reported that it has no initializer, which is a clear false positive. The PR stops counting static members as 'initialized' when deciding whether a class without a constructor has any self-initialized member. That is likely what triggered the whole batch of CSoundFile uninitMemberVarNoCtor warnings, and it is why they all disappear together. Removing this false positive is an improvement. ---- 50 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/libo/libopenmpt-modplug/libopenmpt-modplug_0.8.9.0-openmpt1.orig.tar.gz Result: main libopenmpt-modplug-0.8.9.0-openmpt1/libmodplug/sndfile.h:775:7: warning: Member variable 'CSoundFile::ReadSampleFromSong' has no initializer. [uninitMemberVarNoCtor] Explanation: Line 775 declares a member function, `BOOL ReadSampleFromSong(UINT nSample, CSoundFile *, UINT nSrcSample);`, not a data member. Main reported it as an uninitialized member variable, which is clearly a false positive caused by misparsing. The whole batch of uninitMemberVarNoCtor warnings for CSoundFile disappears with the PR. The likely cause is that static members no longer count as self-initialized, so the 'some members have initializers' trigger no longer fires for this class. Removing this bogus warning is an improvement.