Fix -Wunreachable-code compile error in gfx/2d/DrawTargetSkia.cpp

RESOLVED WONTFIX

Status

()

Core
Graphics
RESOLVED WONTFIX
3 years ago
3 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 affected, firefox43 affected, firefox44 affected, firefox45 affected, firefox46 affected)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8704738 [details] [diff] [review]
Wunreachable-code_DrawTargetSkia.patch

This unreachable code landed in bug 1020629 (to fix DrawTargetSkia::CopySurface for A8 surfaces). The code was disabled with `if (false)`. clang's -Wunreachable-code warnings were recently enabled in bug 1235717, but clang only reports this warning instance when I compile with --disable-optimize.

The disabled code has a comment saying "This is a fast path that is disabled for now to minimize risk". Should we just enable the fast path? If not now, then when? The disabled code landed 1.5 years ago. :)

gfx/2d/DrawTargetSkia.cpp:803:17: error: code will never be executed [-Werror,-Wunreachable-code]
  if (false && !bitmap.mBitmap.getTexture() && mCanvas->imageInfo() == bitmap.mBitmap.info()) {
                ^~~~~~
Attachment #8704738 - Flags: review?(jmuizelaar)
(Assignee)

Updated

3 years ago
Blocks: 1236323
Comment on attachment 8704738 [details] [diff] [review]
Wunreachable-code_DrawTargetSkia.patch

Review of attachment 8704738 [details] [diff] [review]:
-----------------------------------------------------------------

This is being fixed in bug 1239040
Attachment #8704738 - Flags: review?(jmuizelaar) → review-
(Assignee)

Comment 2

3 years ago
Awesome. Thanks! :)
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Depends on: 1239040
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.