All users were logged out of Bugzilla on October 13th, 2018

control reaches end of non-void function GetSpecialSystemDirectory and lots of unhandled enumeration values

RESOLVED FIXED

Status

()

--
trivial
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
/swap/BEOS/mozilla/xpcom/io/SpecialSystemDirectory.cpp:
 In function `nsresult GetSpecialSystemDirectory(enum SystemDirectories, class nsILocalFile **)':
770: warning: enumeration value `OS_CurrentProcessDirectory' not handled in switch
770: warning: enumeration value `OS_CurrentWorkingDirectory' not handled in switch
770: warning: enumeration value `XPCOM_CurrentProcessComponentDirectory' not handled in switch
770: warning: enumeration value `XPCOM_CurrentProcessComponentRegistry' not handled in switch
770: warning: enumeration value `Moz_BinDirectory' not handled in switch
...
771: warning: control reaches end of non-void function `GetSpecialSystemDirectory(SystemDirectories, nsILocalFile **)'
(Assignee)

Comment 1

16 years ago
Created attachment 123249 [details] [diff] [review]
Hide warnings for nondebug and fix problem

Since developers might actually care about unhandled enumeration values i
wrapped the default case in an ifdef.
(Assignee)

Updated

16 years ago
Attachment #123249 - Flags: review?(dougt)

Comment 2

16 years ago
Comment on attachment 123249 [details] [diff] [review]
Hide warnings for nondebug and fix problem

Get rid of the #ifndef DEBUG and r=.
Attachment #123249 - Flags: review?(dougt) → review+
(Assignee)

Comment 3

16 years ago
checked in
Status: NEW → RESOLVED
Last Resolved: 16 years ago
OS: BeOS → All
Hardware: PC → All
Resolution: --- → FIXED

Comment 4

16 years ago
This broke OS/2. We can't find our system directory anymore.

Someone's not checking a return code...

See:

http://bugzilla.mozilla.org/show_bug.cgi?id=207081

This is the only checkin for that period of time.
You need to log in before you can comment on or make changes to this bug.