Closed Bug 683998 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.
Attachment #557600 - Flags: review?(wmccloskey)
Attachment #557600 - Flags: review?(wmccloskey) → review+
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
Closed: 8 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.