Closed Bug 841132 Opened 11 years ago Closed 11 years ago

jsscript.cpp:423:16: warning: variable ‘notes’ set but not used [-Wunused-but-set-variable]

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Build warning:
{
js/src/jsscript.cpp:423:16: warning: variable ‘notes’ set but not used [-Wunused-but-set-variable]

I *think* the last usage of this variable was this code, for bug 571249:
> for (sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn))
which was removed here:
https://hg.mozilla.org/mozilla-central/diff/b35005673847/js/src/jsscript.cpp#l1.30

...though that was a long time ago, so maybe there was another more-recently-removed usage that I'm missing.
Assignee: general → dholbert
Status: NEW → ASSIGNED
Attachment #713583 - Flags: review?(n.nethercote)
sorry, that patch included some unrelated debugging code. reposting.
Attached patch fix v1aSplinter Review
Attachment #713583 - Attachment is obsolete: true
Attachment #713583 - Flags: review?(n.nethercote)
Attachment #713584 - Flags: review?(n.nethercote)
Attachment #713583 - Attachment description: fix v1 → fix v1 (w/ some accidental unrelated debugging code)
Comment on attachment 713584 [details] [diff] [review]
fix v1a

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

It was bug 679940.  Looks ok to me but I'll ask Till for review, since he did bug 679940, and this might suggest some additional cleanups.
Attachment #713584 - Flags: review?(tschneidereit)
Attachment #713584 - Flags: review?(n.nethercote)
Attachment #713584 - Flags: review+
Depends on: 679940
Comment on attachment 713584 [details] [diff] [review]
fix v1a

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

sorry about that, clang's usage warnings don't seem to be triggered by write-only usage. Or I'm just blind. Probably the latter, so take me not seeing more cleanup opportunities with a grain of salt.
Attachment #713584 - Flags: review?(tschneidereit) → review+
no worries / thanks!

(If there end up being more cleanup opportunities that we discover later, I'm sure we can deal with them in other bugs. In the meantime, this is the only GCC 4.7 build warning that I get for this file.)
https://hg.mozilla.org/mozilla-central/rev/e5694309feed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: