struct SomeStruct { SomeStruct(int a, int b) : a(a), b(b) {} int a, c[2]{0, 0}, b; };
[test.cpp:2]: (error) Member variable 'b' is initialized by itself. Tested with cppcheck-2.18.0
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14218
Log in to post a comment.
[test.cpp:2]: (error) Member variable 'b' is initialized by itself.
Tested with cppcheck-2.18.0
Last edit: Vit Kucera 2025-10-21
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14218