Closed Bug 1237352 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox42 --- affected
firefox43 --- affected
firefox44 --- affected
firefox45 --- affected
firefox46 --- affected

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

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)
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-
Awesome. Thanks! :)
Status: NEW → RESOLVED
Closed: 8 years ago
Depends on: 1239040
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: