I just tried to compile today's trunk cppcheck with new C/C++ compiler clang-14.
It said:
$ fgrep warning: mk.clang.out
lib/checkcondition.cpp:477:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:538:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:804:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:819:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:834:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/tokenize.cpp:9639:48: warning: unused parameter 'tok1' [-Wunused-parameter]
lib/tokenize.cpp:9645:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
lib/valueflow.cpp:868:44: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
$
Some of these might be worth fixing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just tried to compile today's trunk cppcheck with new C/C++ compiler clang-14.
It said:
$ fgrep warning: mk.clang.out
lib/checkcondition.cpp:477:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:538:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:804:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:819:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/checkcondition.cpp:834:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
lib/tokenize.cpp:9639:48: warning: unused parameter 'tok1' [-Wunused-parameter]
lib/tokenize.cpp:9645:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
lib/valueflow.cpp:868:44: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
$
Some of these might be worth fixing.
Most of those are FPs. We have a similar check in cppcheck but we only warn when there is no side effects.