Closed Bug 1247531 Opened 9 years ago Closed 9 years ago

Annotate intentional switch fallthrough to suppress -Wimplicit-fallthrough warning in dom/animations/

Categories

(Core :: DOM: Animation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

clang's -Wimplicit-fallthrough warnings (not yet enabled in mozilla-central) warn about switch cases that fall through without a break or return statement. MOZ_FALLTHROUGH (bug 1215411) is an annotation to suppress -Wimplicit-fallthrough warnings where the fallthrough is intentional. dom/animation/AnimationUtils.cpp:73:9: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Attachment #8718225 - Flags: review?(dholbert)
Status: NEW → ASSIGNED
Summary: Annotate intentional switch fallthrough in dom/animations/ to fix -Wimplicit-fallthrough warning → Annotate intentional switch fallthrough to suppress -Wimplicit-fallthrough warning in dom/animations/
Comment on attachment 8718225 [details] [diff] [review] MOZ_FALLTHROUGH_dom-animation.patch Review of attachment 8718225 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #8718225 - Flags: review?(dholbert) → review+
Thanks!
Thank you, Chris and Daniel! I did not know MOZ_FALLTHROUGH at all. I will be careful from now on.
(In reply to Hiroyuki Ikezoe (:hiro) from comment #3) > Thank you, Chris and Daniel! I did not know MOZ_FALLTHROUGH at all. I will > be careful from now on. That's because I haven't advertised it yet. :) I wanted to fix the remaining warnings (and enable -Wimplicit-fallthrough by default) before I tell more people. Note that MOZ_FALLTHROUGH is only needed on switch 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; }
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Blocks: 1253170
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: