Closed
Bug 639732
Opened 14 years ago
Closed 14 years ago
make warnings fatal in the JS engine
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 609532
People
(Reporter: gal, Unassigned)
Details
Warnings keep creeping up on us. They are often harmless, but usually annoying and sometimes bad. Lets just make them fatal and be done with it and checkins will catch them:
../jscntxt.cpp: In member function ‘JSStackFrame* js::StackSegment::computeNextFrame(JSStackFrame*) const’:
../jscntxt.cpp:149: warning: unused variable ‘end’
../jsreflect.cpp: In member function ‘bool js::ASTSerializer::leftAssociate(JSParseNode*, js::Value*)’:
../jsreflect.cpp:2323: warning: unused variable ‘len’
We also have to fix editline, but that should be trivial:
../../editline/editline.c: In function ‘h_last’:
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘h_first’:
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘redisplay’:
../../editline/editline.c:509: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:510: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘toggle_meta_mode’:
../../editline/editline.c:509: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:510: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘do_insert_hist’:
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘wipe’:
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘kill_line’:
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘meta’:
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘editinput’:
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘readline’:
../../editline/editline.c:1031: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c: In function ‘h_search’:
../../editline/editline.c:662: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:667: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:509: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:510: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:509: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:510: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
../../editline/editline.c:316: warning: passing argument 1 of ‘TTYputs’ discards qualifiers from pointer target type
Comment 1•14 years ago
|
||
can't make em fatal on all compilers, that would be annoying.
how about we start with Apple's latest GCC. They only change their compiler every few years, and lots of people hack with it. The linux GCCs tend to be newer and generate more warnings, so linux hackers won't very often have a warn-free build only to burn on tinderbox.
Reporter | ||
Comment 2•14 years ago
|
||
Isn't that ok? You bounce and fix and re-land? Seems not too bad.
Comment 3•14 years ago
|
||
This is a dup. I'll repeat here what I said in bug 609532: we do this in Nanojit. It works great. It's one of those things where everyone worries that it'll cause problems, but in practice it doesn't.
Compile errors are like testing errors but faster to show up and easier to deal with -- either fix immediately or backout the patch.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•