style: knownConditionTrueFalse - Condition '(index+1)%2==0' is always false
void knownConditionTrueFalseFalsePositiveExample() { for(unsigned int index = 0; index < 100; ++index) { if((index + 1) % 2 == 0) { // should get here half the time, not NEVER } else { // should get here half the time, not ALWAYS } } }
I can't reproduce this with either 2.6 or head.
I forgot to mention I am on 2.5, I didn't know 2.6 was available.
Log in to post a comment.
style: knownConditionTrueFalse - Condition '(index+1)%2==0' is always false
I can't reproduce this with either 2.6 or head.
I forgot to mention I am on 2.5, I didn't know 2.6 was available.