Closed Bug 960775 Opened 12 years ago Closed 12 years ago

Retire JS_WARN_UNUSED_RESULT in favor of MOZ_WARN_UNUSED_RESULT

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

The JS_ version is enabled only with GCC, while the MOZ version is both GCC and Clang. Or maybe it should just be replaced with MOZ_WARN? It is only used in two places right now.
Also, the warnings from this don't seem to be fatal in js/src
(In reply to Andrew McCreight [:mccr8] from comment #1) > Also, the warnings from this don't seem to be fatal in js/src I guess warnings-as-errors is just an all-or-nothing thing?
Replace it. (We're just slow about switching to the other stuff for various reasons, inertia being perhaps the biggest.) Newer compilers have -Werror=, which does get used for some things. I don't know if it could be used for this or not. I expect there to be many violations of the use-result requirement, tho. :-(
Yeah, I'd really just want use-result violations to be fatal only when somebody opts in. Anyways, hopefully the output is clean enough that somebody will notice eventually if something breaks.
Summary: JS_WARN_UNUSED_RESULT should be defined in terms of MOZ_WARN_UNUSED_RESULT → Retire JS_WARN_UNUSED_RESULT in favor of MOZ_WARN_UNUSED_RESULT
Attachment #8361667 - Flags: review?(jwalden+bmo) → review+
And of course right before I was going to land this somebody added a bunch of more uses of it. :) https://hg.mozilla.org/integration/mozilla-inbound/rev/73b036d72753
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: