lvandeve / lodepng

PNG encoder and decoder in C and C++.
zlib License
2.08k stars 425 forks source link

Drop >= LFS_ZERO (always true, generates warning) #135

Open AE1020 opened 4 years ago

AE1020 commented 4 years ago

On the line that says:

 if(strategy >= LFS_ZERO && strategy <= LFS_FOUR) {

If compiler warnings are turned up, they will give:

lodepng.cpp: In function ‘filter’:
lodepng.cpp:5437:3: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]

It's not a terribly useful warning here. But it is in some cases informative and can catch misunderstandings, so nice to not have to disable it in a build that treats warnings as errors.