Closed
Bug 568324
Opened 13 years ago
Closed 13 years ago
mozJSSubScriptLoader.cpp:116: warning: statement has no effect
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
References
()
Details
(Whiteboard: [build_warning])
Attachments
(1 file)
1.00 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Filing this bug for this warning: { > js/src/xpconnect/loader/mozJSSubScriptLoader.cpp:116: warning: statement has no effect } The chunk of code is: > 92 NS_IMETHODIMP /* args and return value are delt with using XPConnect and JSAPI */ > 93 mozJSSubScriptLoader::LoadSubScript (const PRUnichar * aURL > 94 /* [, JSObject *target_obj] */) > 95 { [...] >112 #ifdef NS_FUNCTION_TIMER >113 NS_TIME_FUNCTION_FMT("%s (line %d) (url: %s)", MOZ_FUNCTION_NAME, >114 __LINE__, NS_LossyConvertUTF16toASCII(aURL).get()); >115 #else >116 aURL; // prevent compiler warning >117 #endif I'm assuming we're trying to suppress an "unused" compiler warning, but in the process, we're actually causing another compiler warning. The correct way to suppress "unused" (at least in GCC) is: (void)aURL; instead of aURL;
Assignee | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
Comment on attachment 447600 [details] [diff] [review] fix Your assumption is true, this was my bad. Thanks for catching (and fixing) this!
Attachment #447600 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Landed. Thanks for the quick review! http://hg.mozilla.org/mozilla-central/rev/85a03643b723
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Whiteboard: [build_warning]
You need to log in
before you can comment on or make changes to this bug.
Description
•