$ cppcheck --enable=all t.c --suppress=unreadVariable
Checking t.c ...
t.c:6:15: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
a = 0x0FF & ! 0x04;
^
nofile:0:0: information: Active checkers: 106/592 (use --checkers-report=<filename> to see details) [checkersReport]</filename>
$
only 1st issue is detected ... do you know of this miss-detection ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
void main ()
{
int a = 0;
}
$ cppcheck --version
Cppcheck 2.13.0
$ cppcheck --enable=all t.c --suppress=unreadVariable
Checking t.c ...
t.c:6:15: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
a = 0x0FF & ! 0x04;
^
nofile:0:0: information: Active checkers: 106/592 (use --checkers-report=<filename> to see details) [checkersReport]</filename>
$
only 1st issue is detected ... do you know of this miss-detection ?
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/12691