Closed
Bug 1086705
Opened 10 years ago
Closed 10 years ago
-Werror=switch causes TB build failure
Categories
(MailNews Core :: Backend, defect)
Tracking
(thunderbird36 fixed)
RESOLVED
FIXED
Thunderbird 36.0
Tracking | Status | |
---|---|---|
thunderbird36 | --- | fixed |
People
(Reporter: jcranmer, Assigned: jcranmer)
References
Details
(Keywords: dogfood, regression)
Attachments
(1 file)
2.35 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
tl;dr for anyone not present in the IRC conversation:
Thunderbird adds several nsresult error codes. These aren't in the nsresult enum. We switch on them.
Attachment #8508831 -
Flags: review?(nfroyd)
Comment 1•10 years ago
|
||
Comment on attachment 8508831 [details] [diff] [review]
Revert -Werror=switch
Review of attachment 8508831 [details] [diff] [review]:
-----------------------------------------------------------------
We can argue about this elsewhere (perhaps on dev-platform?), but the status quo is that people make up their own nsresult error codes in Gecko already. The (admittedly out-of-date!) documentation in nsError.h tells people exactly how to do this, even! So I think requiring switches on nsresult to adhere to the blessed list of codes in nsErrorList.h is unreasonable.
It'd be an interesting experiment to convert nsresult to a structure type and see if that has adverse effects on performance...
Attachment #8508831 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 36.0
Updated•10 years ago
|
Severity: normal → blocker
Keywords: dogfood,
regression
Comment 3•10 years ago
|
||
nsError.h could be configured so that comm-central uses the `typedef uint32_t nsresult` definition instead of the nsresult enum. Switching on a uint32_t nsresult would no longer generate -Wswitch warnings about out-of-range case values.
Updated•10 years ago
|
status-thunderbird36:
--- → fixed
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•