Closed Bug 574817 Opened 14 years ago Closed 14 years ago

xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp:118: warning: unused variable 'mgr'

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Unassigned)

References

Details

(Whiteboard: [build_warning])

Attachments

(1 obsolete file)

Just noticed a message go by in compiler-spew for this variable being unused:
http://hg.mozilla.org/mozilla-central/annotate/b51803f3fdef/xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp#l118
{
> 108 PRBool 
> 109 xptiInterfaceEntry::ResolveLocked()
> 110 {
[...]
> 118     xptiInterfaceInfoManager* mgr = > xptiInterfaceInfoManager::GetSingleton();
}

This is basically identical to the line that I tweaked in bug 573530, which was a place where we intentionally triggered a lazy initializer during startup.

Is there any reason we need to trigger the lazy initializer here, too?  (won't it already have been triggered?)
> 118     xptiInterfaceInfoManager* mgr = > xptiInterfaceInfoManager::GetSingleton();
(Sorry, that ">" shouldn't be there in the middle of the line -- accidental addition)
Attached patch fix: remove variable (obsolete) — Splinter Review
Unless there's a reason we'd want to trigger lazy-initialization here (and it wouldn't already have been triggered by the line in bug 573530), it looks like this line should just be removed.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #454145 - Flags: review?(benjamin)
Looks like bsmedberg fixed this in bug 568691.
Assignee: dholbert → nobody
No longer blocks: 570488
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Attachment #454145 - Attachment is obsolete: true
Attachment #454145 - Flags: review?(benjamin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: