Closed Bug 1086705 Opened 10 years ago Closed 10 years ago

-Werror=switch causes TB build failure

Categories

(MailNews Core :: Backend, defect)

x86_64
Linux
defect
Not set
blocker

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)

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 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+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 36.0
Severity: normal → blocker
Keywords: dogfood, regression
Blocks: 1087098
Depends on: 1090088
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.
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: