Skip to content

Conversation

@AE1020
Copy link

@AE1020 AE1020 commented Aug 22, 2020

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant