Closed Bug 880078 Opened 6 years ago Closed 6 years ago

XPCWrappedNative.cpp:2209:14: warning: variable 'secFlag' set but not used [-Wunused-but-set-variable]

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Build warning:
{
js/xpconnect/src/XPCWrappedNative.cpp: In static member function 'static JSBool XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)':

js/xpconnect/src/XPCWrappedNative.cpp:2209:14: warning: variable 'secFlag' set but not used [-Wunused-but-set-variable]
}

Introduced by this cset for bug 877478, which removed the only usage of this variable:
 https://hg.mozilla.org/integration/mozilla-inbound/rev/2a2ad2ce8a4c
Attached patch fixSplinter Review
Looks like we can just drop this variable.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #758901 - Flags: review?(bobbyholley+bmo)
(side note: it looks like this might be the last reference to these enumerated flags, too. I wonder if we should remove them as well?  Their definition in the IDL is here:
http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/idl/nsIXPCSecurityManager.idl?mark=27-43#27
and the comment says they're used in "nsIXPConnect::SetSecurityManager", which doesn't exist... 

However, "setDefaultSecurityManager" (adding "default") _does_ exist and does take a "flags" parameter -- so that's probably what the comment should be referring to.  Though even that method appears to just save its flags-bitfield; it never does anything with them.)
Comment on attachment 758901 [details] [diff] [review]
fix

Review of attachment 758901 [details] [diff] [review]:
-----------------------------------------------------------------

Yeah, those flags can go away too.
Attachment #758901 - Flags: review?(bobbyholley+bmo) → review+
(as can the |flags| parameter in setDefaultSecurityManager)
Blocks: 880089
I'll file a followup on dropping the flags & the flags-parameter, since the parameter-removal will presumably require an IID rev and hence be slightly more invasive than this bug. Filed bug 880089.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/971b1e4b4c46
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.