Closed Bug 1000712 Opened 10 years ago Closed 10 years ago

Fix -Wunused-variable warnings in js/src/jit

Categories

(Core :: JavaScript: GC, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox30 --- unaffected
firefox31 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

Attached patch jit_Wunused-variable.patch (obsolete) — Splinter Review
Bug 988950 added two new clang warnings on OS X:

js/src/jit/BaselineCompiler.cpp:2105:14 [-Wunused-variable] unused variable 'nursery'
js/src/jit/BaselineCompiler.cpp:2425:18 [-Wunused-variable] unused variable 'nursery'
Attachment #8411567 - Flags: review?(jcoppeard)
patch v2 adds DebugOnly<> annotations to some variables only used in debug assertions:

js/src/jit/CodeGenerator.cpp:1837:24 [-Wunused-variable] unused variable 'nursery'                                                                       
js/src/jit/CodeGenerator.cpp:1861:24 [-Wunused-variable] unused variable 'nursery'
Attachment #8411567 - Attachment is obsolete: true
Attachment #8411567 - Flags: review?(jcoppeard)
Attachment #8411623 - Flags: review?(jcoppeard)
(In reply to Chris Peterson (:cpeterson) from comment #0)
> Created attachment 8411567 [details] [diff] [review]
> jit_Wunused-variable.patch
> 
> Bug 988950 added two new clang warnings on OS X:
> 
> js/src/jit/BaselineCompiler.cpp:2105:14 [-Wunused-variable] unused variable
> 'nursery'
> js/src/jit/BaselineCompiler.cpp:2425:18 [-Wunused-variable] unused variable
> 'nursery'

Fixed this one directly in bug 988950, sorry not to have checked if there was an open bug for these warnings.
Comment on attachment 8411623 [details] [diff] [review]
jit_Wunused-variable_v2.patch

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

Ugh, sorry about the warnings.  r=me.
Attachment #8411623 - Flags: review?(jcoppeard) → review+
bbouvier landeded BaselineCompiler.cpp fixes in bug 988950. Here I land CodeGenerator.cpp, but replacing DebugOnly<> with #ifdef DEBUG because the release build did not like DebugOnly<> holding a reference:

https://hg.mozilla.org/integration/mozilla-inbound/rev/169eaed7017b
Summary: Fix -Wunused-variable warnings in js/src/jit/BaselineCompiler.cpp → Fix -Wunused-variable warnings in js/src/jit
https://hg.mozilla.org/mozilla-central/rev/169eaed7017b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.