Skip to content

Fix unused error variable#60

Open
lunixoid wants to merge 1 commit intolvandeve:masterfrom
lunixoid:master
Open

Fix unused error variable#60
lunixoid wants to merge 1 commit intolvandeve:masterfrom
lunixoid:master

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