Hey.
I believe that I am encountering a couple of false positives for unusedStructMember in my codebase.
I am using cppcheck 2.7, and have confirmed that this issue is present in the latest code on Github, as of this morning.
Thanks for reporting. I have added your example to this ticket: https://trac.cppcheck.net/ticket/10587
There also is no warning for for (BUTTON_TABLE&& : buttonTable)
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey.
I believe that I am encountering a couple of false positives for unusedStructMember in my codebase.
I am using cppcheck 2.7, and have confirmed that this issue is present in the latest code on Github, as of this morning.
I am running the following on the command line:
and am getting the following output:
The below is a simple repro of the issue I am encountering:
test.cpp
I can get around both of these false positives by moving BUTTON_TABLE buttonTable[] outside of the "create" function.
I can also get around
specifically by changing BUTTON_TABLE::button's type from uint32_t to BUTTON:
Kind Regards
Thanks for reporting. I have added your example to this ticket: https://trac.cppcheck.net/ticket/10587
There also is no warning for
for (BUTTON_TABLE&& : buttonTable)