Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused error variable #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lunixoid
Copy link

@lunixoid lunixoid commented Oct 27, 2017

I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio:
lodepng/lodepng.cpp 5265 warn V547 Expression '!error' is always true.

The variable unsigned error = 0; was initialised but never used. In this function errors was realised as a return code, f.e.:
if(bpp == 0) return 31;
So variable error is not deeded here.

The variable unsigned error = 0; was initialised but never used. In this function errors was realised as a return code, f.e.:
if(bpp == 0) return 31;
So variable error is not needed here.
@jslee02
Copy link

jslee02 commented Oct 27, 2017

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.

2 participants