Menu

#211 il_states.c: 2 * bad if test ?

open
nobody
None
5
2013-06-22
2013-06-22
dcb
No

I just ran the static analysis checker "cppcheck"
over the source code of DevIL-1.7.8

It said

[../src-IL/src/il_states.c:1127]: (warning) Logical disjunction always evaluates to true: Param >= 0 || Param <= 2.

[../src-IL/src/il_states.c:1133]: (warning) Logical disjunction always evaluates to true: Param >= -1 || Param <= 255.

In both cases, suggest replace || with &&

Discussion


Log in to post a comment.

MongoDB Logo MongoDB