Closed Bug 864342 Opened 7 years ago Closed 7 years ago

IonCaches.cpp:579:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

New GCC build warning:
{
js/src/ion/IonCaches.cpp:579:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

   if (idint < 0 || idint >= argsObj.initialLength())
}
added here: http://hg.mozilla.org/mozilla-central/rev/503a5fb6d530#l1.64 for bug 861596.

idint is signed,  argsObj.initialLength() is unsigned. By the time we're comparing them, we know idint is nonnegative, so we can just static_cast it.
Comment on attachment 740311 [details] [diff] [review]
fix

Review of attachment 740311 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for taking care of this!
Attachment #740311 - Flags: review?(kvijayan) → review+
https://hg.mozilla.org/mozilla-central/rev/ba1a51d840b3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.