GCC 4.6 build warning: "jsparse.cpp:8457:16: warning: variable 'afterComma' 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
x86_64
Linux
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/jsparse.cpp: In member function 'JSParseNode* js::Parser::primaryExpr(js::TokenKind, JSBool)':

js/src/jsparse.cpp:8457:16: warning: variable 'afterComma' set but not used [-Wunused-but-set-variable]
}

A MXR search of old CVS source tree shows that in this variable was originally used once:
https://mxr.mozilla.org/firefox/search?string=afterComma&find=%2Fjs
{
/js/src/jsparse.c
line 5491 -- JSBool afterComma;
line 5507 -- afterComma = JS_FALSE;
line 5559 -- if (afterComma &&         <------------ (here's the only usage)
line 5628 -- afterComma = JS_TRUE;
}

That usage was deleted in this cset for Bug 508637:
  https://hg.mozilla.org/mozilla-central/rev/12cc5c8c1236

Looks like this variable can just go away now.
(Assignee)

Comment 1

6 years ago
Created attachment 558883 [details] [diff] [review]
fix: remove unused variable
Assignee: general → dholbert
Status: NEW → ASSIGNED
Attachment #558883 - Flags: review?(jimb)

Updated

6 years ago
Attachment #558883 - Flags: review?(jimb) → review+
(Assignee)

Comment 2

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