Note: There are a few cases of duplicates in user autocompletion which are being worked on.

GCC 4.6 build warning: "jstracer.cpp:17174:20: warning: variable 'v' set but not used [-Wunused-but-set-variable]"

RESOLVED FIXED in mozilla9

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks: 1 bug)

Trunk
mozilla9
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Filing bug on this GCC 4.6 build warning:
js/src/jstracer.cpp:17174:20: warning: variable 'v' set but not used [-Wunused-but-set-variable]

Here's the chunk of code, quoted from the cset that added it (for bug 606650):
>   1.134 +    } else if (op == JSOP_AND) {
>   1.135 +        bool b = !!js_ValueToBoolean(cx->regs->sp[-1]);
>   1.136 +        StackValue v = stackAt(-1);
>   1.137 +        if (b)
>   1.138 +            stackPop();
>   1.139 +    } else {
https://hg.mozilla.org/mozilla-central/rev/81fa7d0b8f00#l1.134

Looks indeed like |v| is unused there (and I assume (?) the stackAt(-1) call doesn't have any side effects that need to take place).

So, I think that line (marked 1.136 above) can simply be deleted.
(Assignee)

Comment 1

6 years ago
Created attachment 557600 [details] [diff] [review]
fix: remove unused variable
Attachment #557600 - Flags: review?(wmccloskey)
Attachment #557600 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 2

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/3959615183f6
Assignee: general → dholbert
Status: NEW → ASSIGNED
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/3959615183f6
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.