Closed
Bug 723534
Opened 13 years ago
Closed 13 years ago
Remove dead default cases.
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: espindola, Assigned: espindola)
References
Details
Attachments
(1 file, 1 obsolete file)
1.37 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Clang warns on default cases that are never reached. This is currently breaking the build with --enable-warnings-as-errors. The attached patch fixes some cases.
Attachment #593846 -
Flags: review?(jmuizelaar)
Comment 1•13 years ago
|
||
Comment on attachment 593846 [details] [diff] [review]
Remove dead default cases.
This patch is a bit riskier, let's get Ehsan to review it as his probably a more appropriate reviewer for stuff in content/.
Attachment #593846 -
Flags: review?(jmuizelaar) → review?(ehsan)
Comment 2•13 years ago
|
||
Comment on attachment 593846 [details] [diff] [review]
Remove dead default cases.
Review of attachment 593846 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not the right person to review the canvas changes.
::: content/smil/nsSMILTimedElement.cpp
@@ +2203,2 @@
> }
> + MOZ_NOT_REACHED("Switch is incomplete!");
Please don't change the debug string here. Also shouldn't you return something here?
@@ +2275,2 @@
> }
> + MOZ_NOT_REACHED("Switch is incomplete!");
Ditto.
Attachment #593846 -
Flags: review?(ehsan)
Comment 3•13 years ago
|
||
Comment on attachment 593846 [details] [diff] [review]
Remove dead default cases.
The canvas changes seem fine to me.
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #2)
> Comment on attachment 593846 [details] [diff] [review]
> Remove dead default cases.
>
> Review of attachment 593846 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I'm not the right person to review the canvas changes.
>
> ::: content/smil/nsSMILTimedElement.cpp
> @@ +2203,2 @@
> > }
> > + MOZ_NOT_REACHED("Switch is incomplete!");
>
> Please don't change the debug string here. Also shouldn't you return
> something here?
No, that is the point. The dynamics are:
* We build with -Werror
* If the switch is missing a case and has no default, the build fails.
* If the switch has all the cases and a default, the build succeeds
The net result is that without the default case, the build works if and only if all the cases ore covered, which is normally exactly what we need. The unreachable is there just to help other compilers and as documentation.
Assignee | ||
Comment 5•13 years ago
|
||
Assignee: nobody → respindola
Attachment #593846 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #594091 -
Flags: review?(ehsan)
Updated•13 years ago
|
Attachment #594091 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•