Closed
Bug 742788
Opened 12 years ago
Closed 12 years ago
js/src/jsinterp.cpp:954:31: warning: comparison of unsigned expression >= 0 is always true
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.32 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Filing bug on these build warnings: { js/src/jsinterp.cpp: In function ‘void LeaveWith(JSContext*)’: js/src/jsinterp.cpp:954:31: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] js/src/jsopcode.cpp: In member function ‘char& js::Sprinter::operator[](size_t)’: js/src/jsopcode.cpp:778:14: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] } In both cases, we're just asserting that a value is nonnegative, and in both cases the value is unsigned so the assertion will trivially always pass.
Assignee | ||
Comment 1•12 years ago
|
||
In this patch's first chunk, the stackDepth method on WithObject returns uint32, as shown here: http://mxr.mozilla.org/mozilla-central/source/js/src/vm/ScopeObject.h#188 (the method is inherited from NestedScopeObject) So that's unsigned. And the second chunk directly deals with a size_t variable, which is unsigned by definition.
Attachment #612601 -
Flags: review?
Assignee | ||
Updated•12 years ago
|
Attachment #612601 -
Flags: review? → review?(luke)
Assignee | ||
Comment 2•12 years ago
|
||
FWIW, it looks like patch's first chunk (and the stackDepth() method that it calls) was added in Bug 713311: http://hg.mozilla.org/mozilla-central/rev/f0d76403ae9c#l25.176 and the second chunk (in jsopcode.cpp) was added in Bug 688891: http://hg.mozilla.org/mozilla-central/diff/24dac171a324/js/src/jsopcode.cpp#l1.162
Comment 3•12 years ago
|
||
Comment on attachment 612601 [details] [diff] [review] fix lol. To wit, I have the LeaveWith case nixed in a patch in my queue :)
Attachment #612601 -
Flags: review?(luke) → review+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Luke Wagner [:luke] from comment #3) > lol. To wit, I have the LeaveWith case nixed in a patch in my queue :) Great minds think alike! :)
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b1db4217e068
Target Milestone: --- → mozilla14
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b1db4217e068
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•