Last Comment Bug 685234 - GCC 4.6 build warning: "jsparse.cpp:8457:16: warning: variable 'afterComma' set but not used [-Wunused-but-set-variable]"
: GCC 4.6 build warning: "jsparse.cpp:8457:16: warning: variable 'afterComma' s...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla9
Assigned To: Daniel Holbert [:dholbert]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: buildwarning 508637
  Show dependency treegraph
 
Reported: 2011-09-07 11:04 PDT by Daniel Holbert [:dholbert]
Modified: 2011-09-08 10:27 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix: remove unused variable (1.87 KB, patch)
2011-09-07 11:08 PDT, Daniel Holbert [:dholbert]
jimb: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2011-09-07 11:04:49 PDT
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.
Comment 1 Daniel Holbert [:dholbert] 2011-09-07 11:08:26 PDT
Created attachment 558883 [details] [diff] [review]
fix: remove unused variable
Comment 2 Daniel Holbert [:dholbert] 2011-09-07 11:42:15 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/dcd8e435c616

Note You need to log in before you can comment on or make changes to this bug.