Closed Bug 622647 Opened 11 years ago Closed 11 years ago

mozJSComponentLoader.cpp:351: warning: ‘nsresult ReadScriptFromStream(JSContext*, nsIObjectInputStream*, JSScript**)’ defined but not used (and same with WriteScriptToStream)

Categories

(Core :: XPConnect, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: dholbert)

Details

(Whiteboard: [build_warning] fixed-in-tracemonkey)

Attachments

(1 file)

When building mozJSComponentLoader.cpp in a non-libxul build, I get:
../../../../../mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp:351: warning: ‘nsresult ReadScriptFromStream(JSContext*, nsIObjectInputStream*, JSScript**)’ defined but not used
../../../../../mozilla/js/src/xpconnect/loader/mozJSComponentLoader.cpp:411: warning: ‘nsresult WriteScriptToStream(JSContext*, JSScript*, nsIObjectOutputStream*)’ defined but not used

These functions are only used once, and their only use is guarded with
 #ifdef MOZ_ENABLE_LIBXUL
ever since this cset:
 http://hg.mozilla.org/mozilla-central/diff/fa2993d88825/js/src/xpconnect/loader/mozJSComponentLoader.cpp#l1.278

Since these static methods are only used in libxul builds, they only need to be defined in libxul builds.  Trivial patch coming up to just guard the definitions with MOZ_ENABLE_LIBXUL (fixing the build warning).
Summary: ozJSComponentLoader.cpp:351: warning: ‘nsresult ReadScriptFromStream(JSContext*, nsIObjectInputStream*, JSScript**)’ defined but not used (and same with WriteScriptToStream) → mozJSComponentLoader.cpp:351: warning: ‘nsresult ReadScriptFromStream(JSContext*, nsIObjectInputStream*, JSScript**)’ defined but not used (and same with WriteScriptToStream)
Attached patch trivial fixSplinter Review
Attachment #500873 - Flags: review?(dwitte)
Severity: normal → trivial
OS: Linux → All
Hardware: x86 → All
Comment on attachment 500873 [details] [diff] [review]
trivial fix

r=dwitte!
Attachment #500873 - Flags: review?(dwitte) → review+
http://hg.mozilla.org/tracemonkey/rev/2215b740bca4
Whiteboard: [build_warning] → [build_warning] fixed-in-tracemonkey
I backed this out because of tinderbox failures.
Whiteboard: [build_warning] fixed-in-tracemonkey → [build_warning]
Re-landed: http://hg.mozilla.org/tracemonkey/rev/294ea1c399f9

(Note that Comment 4 was part of a mass backout -- this particular checkin was almost certainly not responsible for the tinderbox failures)
Whiteboard: [build_warning] → [build_warning] fixed-in-tracemonkey
This landed on mozilla-central as part of a tracemonkey merge a few weeks ago:
   http://hg.mozilla.org/mozilla-central/rev/294ea1c399f9

Closing.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.