DevIL icon indicating copy to clipboard operation
DevIL copied to clipboard

src-IL/src/il_states.c: 2 * bad compare ?

Open dcb314 opened this issue 3 years ago • 1 comments

clang compiler says:

src-IL/src/il_states.c:1133:20: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]

Source code is

if (Param >= -1 || Param <= 255) {

src-IL/src/il_states.c:1127:19: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]

if (Param >= 0 || Param <= 2) {

dcb314 avatar Jan 07 '22 10:01 dcb314

Well, yes: those conditions are useless. I guess the expected operator was AND, not OR

RedLicorice avatar Sep 14 '22 12:09 RedLicorice