Bug 966695 - Fix signed/unsigned comparison warning. r=Waldo
authorBenjamin Peterson <benjamin@python.org>
Sat, 01 Feb 2014 21:16:42 -0500
changeset 182546 dfad58dd98b640ba21974794a97a823c67805039
parent 182545 05fd25b6979ef8019400cd2fd8f0385e713d8e76
child 182547 2c83ee786856dff787c68df6724a831b318c44bb
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs966695
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 966695 - Fix signed/unsigned comparison warning. r=Waldo
js/src/frontend/BytecodeEmitter.cpp
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -5161,17 +5161,17 @@ EmitReturn(ExclusiveContext *cx, Bytecod
     if (Emit1(cx, bce, JSOP_RETURN) < 0)
         return false;
 
     NonLocalExitScope nle(cx, bce);
 
     if (!nle.prepareForNonLocalJump(nullptr))
         return false;
 
-    if (top + JSOP_RETURN_LENGTH != bce->offset()) {
+    if (top + static_cast<ptrdiff_t>(JSOP_RETURN_LENGTH) != bce->offset()) {
         bce->code()[top] = JSOP_SETRVAL;
         if (Emit1(cx, bce, JSOP_RETRVAL) < 0)
             return false;
     }
 
     return true;
 }