Closed Bug 1146198 Opened 9 years ago Closed 9 years ago

incorrect compile warnings about errorStringNameForErrorCode() being unused

Categories

(MailNews Core :: Composition, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 39.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #952493 comment 34 +++

There are several compile warnings like this one:
mailnews/compose/src/nsComposeStrings.h: At global scope:
mailnews/compose/src/nsComposeStrings.h:73:24: warning: 'const char16_t* nameForID(nsresult)' defined but not used [-Wunused-function]
 static const char16_t* errorStringNameForErrorCode(nsresult aCode)
                        ^
Also the function is compiled multiple times (in whole TB build) causing a row of warnings like these:
mailnews/compose/src/nsComposeStrings.h:123:5: warning: case value '5583115' not in enumerated type 'nsresult' [-Wswitch]
     case NS_MSG_CANCELLING:

May it be something with the function being static and in a .h file?
Attached patch patchSplinter Review
This seems to work for me. However the final link is broken for me today, I'd like a try run of this to check if the function is found at final link of TB. Suyash, can you push it to try server?
Attachment #8581357 - Flags: feedback?(syshagarwal)
(In reply to :aceman from comment #1)
> Created attachment 8581357 [details] [diff] [review]
> patch
> 
> This seems to work for me. However the final link is broken for me today,
> I'd like a try run of this to check if the function is found at final link
> of TB. Suyash, can you push it to try server?

Sure
https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=052a6d9c8bee
Comment on attachment 8581357 [details] [diff] [review]
patch

Thanks, looks good on try.
Attachment #8581357 - Flags: review?(neil)
Comment on attachment 8581357 [details] [diff] [review]
patch

Fair enough, I guess.
Attachment #8581357 - Flags: review?(neil) → review+
Thanks.
Keywords: checkin-needed
Version: unspecified → Trunk
Is there any reason this should go into TB 38?
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
I do not see any reason. It is just code polish, no user visible change.
Comment on attachment 8581357 [details] [diff] [review]
patch

Removing the feedback request as the patch is checked in :P
Attachment #8581357 - Flags: feedback?(syshagarwal)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: