DentonW / DevIL

Developer's Image Library (DevIL) is a cross-platform image library utilizing a simple syntax to load, save, convert, manipulate, filter, and display a variety of images with ease. It is highly portable and has been ported to several platforms.
http://openil.sourceforge.net/
GNU Lesser General Public License v2.1
446 stars 137 forks source link

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

Open dcb314 opened 2 years ago

dcb314 commented 2 years ago

clang compiler says:

1.

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) {

2.

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

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

RedLicorice commented 2 years ago

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