Hi
Using version 2.10 and online void f() { unsigned char test1 = 0; test1 = (std::min)(test1,1); if(test1 == 0) { }
unsigned char test2 = 0; test2 = std::min(test2,1); if(test2 == 0) { } }
result Cppcheck 2.10 [test.cpp:5]: (style) Condition 'test1==0' is always false Done!
cppcheck handles std::min diffrent then (std::min)
Best regards Jens.
Thanks for reporting, please refer to this ticket: https://trac.cppcheck.net/ticket/11449
Log in to post a comment.
Hi
Using version 2.10 and online
void f()
{
unsigned char test1 = 0;
test1 = (std::min)(test1,1);
if(test1 == 0) {
}
unsigned char test2 = 0;
test2 = std::min(test2,1);
if(test2 == 0) {
}
}
result
Cppcheck 2.10
[test.cpp:5]: (style) Condition 'test1==0' is always false
Done!
cppcheck handles std::min diffrent then (std::min)
Best regards Jens.
Thanks for reporting, please refer to this ticket: https://trac.cppcheck.net/ticket/11449