Closed Bug 454475 Opened 16 years ago Closed 16 years ago

Fix "unhandled enumeration value" warnings in layout/

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9.1b1

People

(Reporter: Swatinem, Assigned: Swatinem)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
GCC complains about a lot of unhandled enumeration values. Some bogus default cases can easily silence those warnings.
Attachment #337748 - Flags: superreview?(roc)
Attachment #337748 - Flags: review?(roc)
Have you checked that we shouldn't be handling the other cases here? If so, I'd like to see comments explaining why we don't need to handle any other cases.
Attached patch added comments (obsolete) — Splinter Review
I added the unhandled values directly to the switches instead of using default in most of the cases. Added comments to most cases.
eCSSUnit_Local_Font and eCSSUnit_Font_Format were added by bug 441469. I believe it's fine to just break at those cases.
Attachment #337748 - Attachment is obsolete: true
Attachment #338619 - Flags: superreview?(roc)
Attachment #338619 - Flags: review?(roc)
Attachment #337748 - Flags: superreview?(roc)
Attachment #337748 - Flags: review?(roc)
+      case ePopupClosed:
+        // aState defaults to "closed"
+        break;

Move the AssignLiteral("closed") down to here. And put in a 'default:' clause which does NS_NOTREACHED("Bad popup state").
(In reply to comment #3)
> Move the AssignLiteral("closed") down to here. And put in a 'default:' clause
> which does NS_NOTREACHED("Bad popup state").

done.
Attachment #338619 - Attachment is obsolete: true
Attachment #338837 - Flags: superreview?(roc)
Attachment #338837 - Flags: review?(roc)
Attachment #338619 - Flags: superreview?(roc)
Attachment #338619 - Flags: review?(roc)
Attachment #338837 - Flags: superreview?(roc)
Attachment #338837 - Flags: superreview+
Attachment #338837 - Flags: review?(roc)
Attachment #338837 - Flags: review+
Keywords: checkin-needed
Comment on attachment 338837 [details] [diff] [review]
v3
[Checkin: Comment 5]

http://hg.mozilla.org/mozilla-central/rev/85f88079a4ee
Attachment #338837 - Attachment description: v3 → v3 [Checkin: Comment 5]
Severity: normal → minor
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Blocks: 511673
Depends on: 1437655
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: