Remove a dead check after the frame loop in nsWebPDecoder.cpp
Categories
(Core :: Graphics: ImageLib, task)
Tracking
()
People
(Reporter: Sylvestre, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=c++])
Filing as a good first bug to learn workflows.
After do { ... } while (!complete);, complete is always true: the loop can only exit early through a return. The following if (!complete) { ... } block is dead; remove it.
Current code:
if (!complete) {
return LexerResult(Yield::NEED_MORE_DATA);
Link to the code:
https://searchfox.org/firefox-main/source/image/decoders/nsWebPDecoder.cpp
To verify the fix:
./mach build
./mach gtest 'Image*'
This was reported by Coverity Scan (CID 1448043). The analyzer will stop reporting it once the change lands.
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Description
•