AI review of 2026-10-03_15-22-43-b8fbea93a208-results.txt PR: #8910 https://github.com/cppcheck-opensource/cppcheck/pull/8910 Tested: b8fbea93a2089af2c38ccdf77e926cb5e07a188e Merge base: fa6c1f1327057cb8ad4764df236daf6d3c70e359 Reviewed: 2026-10-06 16:27:34 UTC Model: claude-opus-5-5 (effort high) Results: 8 reviewed of 8 in the report Verdicts: 1 improvement, 7 regression Tokens: 19276 input, 16142 cache read, 2306 cache write, 8251 output The verdicts are written by AI and can be wrong. ---- 1 / 8 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/shownet/ShowNetNodeTest.cpp:71:9: warning: Member variable 'ShowNetNodeTest::m_handler_called' has no initializer. [uninitMemberVarNoCtor] Explanation: The class has no constructor, and `int m_handler_called` has no initializer, so main's warning is technically correct. The only const members are `static const uint8_t EXPECTED_PACKET[]` and `EXPECTED_PACKET2[]`. Static members do not stop the class from being default constructible. The new check (`var.isConst() && !var.isClass()`) does not appear to skip static members, so these arrays wrongly mark the class as not default constructible and the warning is suppressed. The other removed warnings in this package are all in similar CppUnit fixtures and probably have the same cause. This is a true positive lost for the wrong reason. ---- 2 / 8 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/usbpro/ArduinoWidgetTest.cpp:67:18: warning: Member variable 'ArduinoWidgetTest::m_tod_counter' has no initializer. [uninitMemberVarNoCtor] Explanation: ArduinoWidgetTest has no constructor, and m_tod_counter has no initializer, so the warning is valid by Cppcheck's rules. The PR stops checking the whole class if any member is a reference or a non-class const without a default. This class has `static const uint8_t TEST_RDM_DATA[];`, which is a static member. Static members do not make a class non-default-constructible, so the new check wrongly applies here and suppresses all warnings for the class. The warning was removed for a wrong reason, not because Cppcheck understands the code better. ---- 3 / 8 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/usbpro/ArduinoWidgetTest.cpp:68:13: warning: Member variable 'ArduinoWidgetTest::m_transaction_number' has no initializer. [uninitMemberVarNoCtor] Explanation: ArduinoWidgetTest has no user constructor, and CppUnit default-constructs it, so it is clearly default constructible. `m_transaction_number` has no initializer, so main's uninitMemberVarNoCtor warning is technically correct. The only const non-class member without an initializer is `static const uint8_t TEST_RDM_DATA[];`. The new code apparently treats it as a non-static const member and wrongly concludes the default constructor is deleted. Static members do not affect default constructibility, so the PR's reasoning does not apply. The warning was dropped by mistake rather than because it was a false positive. setUp() may assign the member before use, which makes the original warning low-value in practice, but its removal is still caused by a logic flaw. ---- 4 / 8 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/usbpro/DmxterWidgetTest.cpp:73:16: warning: Member variable 'DmxterWidgetTest::m_tod_counter' has no initializer. [uninitMemberVarNoCtor] Explanation: DmxterWidgetTest has no constructor, and `m_tod_counter` (unsigned int) has no initializer. Default construction leaves it indeterminate; it only gets a value later in setUp(). So the old warning was technically valid. The only member that fits the PR's new 'not default constructible' rule is `static const uint8_t TEST_RDM_DATA[]`. It is const and not a class type, but it is a static member. It does not stop the class from being default constructed. The PR does not exclude static members, so it wrongly marks the class as not default constructible and drops the warning. This is a lost true positive caused by a bug in the new check. ---- 5 / 8 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/usbpro/EnttecUsbProWidgetTest.cpp:111:10: warning: Member variable 'EnttecUsbProWidgetTest::m_got_dmx' has no initializer. [uninitMemberVarNoCtor] Explanation: EnttecUsbProWidgetTest is an ordinary, default-constructible CppUnit fixture. Its only const members are static, for example `static const uint8_t TEST_RDM_DATA[];` and `static const UID DESTINATION;`. Static members do not affect whether the class is default constructible. The new check `var.isConst() && !var.isClass()` most likely matches the static const array and sets isDefaultConstructible = false, which suppresses all warnings for the class. That reasoning is wrong for static members. `m_got_dmx` really is left uninitialized at construction (it is only assigned in setUp()), so the removed warning was a valid diagnostic dropped for an incorrect reason. ---- 6 / 8 ---- Verdict: IMPROVEMENT (low confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/usbpro/EnttecUsbProWidgetTest.cpp:85:13: warning: Member variable 'EnttecUsbProWidgetTest::m_transaction_number' has no initializer. [uninitMemberVarNoCtor] Explanation: EnttecUsbProWidgetTest is a CppUnit fixture with no constructor; m_transaction_number is a plain uint8_t that is presumably set in setUp() before every test. uninitMemberVarNoCtor is meant to fire only when a class already uses default member initializers. Here the only 'initialized' members are static consts (e.g. ESTA_ID = 0x00a1), which say nothing about how instance members are initialized, so main's warning was mostly noise. The PR removes it, but probably for a dubious reason: the static const members seem to be treated as making the class non-default-constructible, and static members do not affect that. Strictly, the member is uninitialized right after construction, so this is not clearly a false positive. Confidence is low. ---- 7 / 8 ---- Verdict: REGRESSION (low confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/usbpro/RobeWidgetTest.cpp:83:13: warning: Member variable 'RobeWidgetTest::m_transaction_number' has no initializer. [uninitMemberVarNoCtor] Explanation: RobeWidgetTest has no user-declared constructor and is default constructible. Its only reference/const non-class members are static, for example `static const uint8_t TEST_RDM_DATA[]`. Static members do not delete the implicit default constructor. The new check `var.isReference() || (var.isConst() && !var.isClass())` apparently treats such a static const array as making the class not default constructible. That suppresses the warning for the wrong reason. Ordinary instance members such as `m_transaction_number` are still left uninitialized by the implicit constructor, so the removed warning was technically correct. Caveat: in a CppUnit fixture, `setUp()` probably initializes the member, so in practice the warning is low value. ---- 8 / 8 ---- Verdict: REGRESSION (medium confidence) Package: https://ftp.debian.org/debian/pool/main/o/ola/ola_0.10.9.nojsmin.orig.tar.gz Result: main ola-0.10.9/plugins/usbpro/RobeWidgetTest.cpp:85:10: warning: Member variable 'RobeWidgetTest::m_new_dmx_data' has no initializer. [uninitMemberVarNoCtor] Explanation: RobeWidgetTest has no constructor and is default-constructed by CppUnit, so `bool m_new_dmx_data` is left uninitialized until setUp() runs. The warning is technically correct. The only plausible reason it disappeared is the new `isConst() && !isClass()` check. The class has static const members without an in-class initializer, such as `static const uint8_t TEST_RDM_DATA[]`. The PR wrongly treats these as making the class non-default-constructible, but static members do not affect default construction. The true positive is suppressed by flawed logic that should skip static members.