Closed
Bug 1215892
Opened 7 years ago
Closed 7 years ago
Fix -Wimplicit-fallthrough warnings in gfx
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
6.09 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
MOZ_FALLTHROUGH is an annotation to suppress clang warnings about switch cases that fall through without a break or return statement. MOZ_FALLTHROUGH is only needed on cases that have code: switch (foo) { case 1: // These cases have no code. No fallthrough annotations are needed. case 2: case 3: foo = 4; // This case has code, so a fallthrough annotation is needed: MOZ_FALLTHROUGH; default: return foo; } gfx/gl/GLBlitHelper.cpp:395:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels gfx/layers/apz/src/AsyncPanZoomController.cpp:1087:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels gfx/layers/apz/src/AsyncPanZoomController.cpp:1196:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels gfx/layers/apz/src/GestureEventListener.cpp:411:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels gfx/layers/apz/util/APZEventState.cpp:292:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels gfx/layers/apz/util/APZEventState.cpp:295:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels widget/GfxInfoBase.cpp:1015:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
Attachment #8675357 -
Flags: review?(bgirard)
Comment 1•7 years ago
|
||
Comment on attachment 8675357 [details] [diff] [review] MOZ_FALLTHROUGH_gfx.patch Review of attachment 8675357 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/gl/GLBlitHelper.cpp @@ +390,5 @@ > MOZ_ASSERT(texUnitLoc != -1, "uniform uTexUnit not found"); > mGL->fUniform1i(texUnitLoc, 0); > break; > +#else > + MOZ_FALLTHROUGH; Even if you're preserving the semantic of old code you're patching this to make it look like the fall-through is intentional rather than a mistake. I believe the fall-through is a mistake since the ConvertPlanarYCbCr code is not appropriate for gralloc. r+ if you change this to be: MOZ_ASSERT_UNREACHABLE("gralloc not support on non-android"); break;
Attachment #8675357 -
Flags: review?(bgirard) → review+
Comment 3•7 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a5d54cef3b23
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•