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

RESOLVED FIXED in Firefox 31

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

(Blocks 1 bug)

unspecified
mozilla31
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox30 unaffected, firefox31 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

5 years ago
Posted 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)
Assignee

Comment 1

5 years ago
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+
Assignee

Comment 4

5 years ago
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: 5 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.