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 #933

Closed
wants to merge 1 commit into from
Closed

Fix unused error variable #933

wants to merge 1 commit into from

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:
dart/dart/external/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 deeded here.
@jslee02
Copy link
Member

jslee02 commented Oct 27, 2017

Thanks for the report. However, lodepng.h/cpp are external code of https://github.com/lvandeve/lodepng. Could you please report this to the upstream repo instead? Once it's merged in the repo, we are happy to copy the new lodepng.h/cpp into our repository. Closing this PR for now.

@jslee02 jslee02 closed this Oct 27, 2017
@lunixoid
Copy link
Author

Ok.

@lunixoid
Copy link
Author

New PR lvandeve/lodepng#60.

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.

None yet

2 participants