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)
Core
DOM: Animation
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
1.76 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
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)
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
status-firefox47:
--- → affected
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 1•9 years ago
|
||
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+
Assignee | ||
Comment 2•9 years ago
|
||
Thanks!
Comment 3•9 years ago
|
||
Thank you, Chris and Daniel! I did not know MOZ_FALLTHROUGH at all. I will be careful from now on.
Assignee | ||
Comment 4•9 years ago
|
||
(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;
}
Comment 6•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•