Fix warnings in js/src (no bug,r=themaid)
authorLuke Wagner <luke@mozilla.com>
Fri, 17 Aug 2012 11:21:52 -0700
changeset 102696 a32f22345f2f0b3dbfdfd1caea893833ebd6dd57
parent 102695 7e0c5cdfc6489eb8415edce2c498011883426ad8
child 102697 e3be0d0460854baa57b2389e70ed0ab4086a4dfb
push id23303
push userryanvm@gmail.com
push dateSat, 18 Aug 2012 11:22:19 +0000
treeherdermozilla-central@9c48df21d744 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersthemaid
milestone17.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
Fix warnings in js/src (no bug,r=themaid)
js/src/vm/GlobalObject.cpp
--- a/js/src/vm/GlobalObject.cpp
+++ b/js/src/vm/GlobalObject.cpp
@@ -209,29 +209,29 @@ intrinsic_IsCallable(JSContext *cx, unsi
 static JSBool
 intrinsic_ThrowError(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     JS_ASSERT(args.length() >= 1);
     uint32_t errorNumber = args[0].toInt32();
 
     char *errorArgs[3] = {NULL, NULL, NULL};
-    for (int i = 1; i < 3 && i < args.length(); i++) {
+    for (unsigned i = 1; i < 3 && i < args.length(); i++) {
         RootedValue val(cx, args[i]);
         if (val.isInt32() || val.isString()) {
             errorArgs[i - 1] = JS_EncodeString(cx, ToString(cx, val));
         } else {
             ptrdiff_t spIndex = cx->stack.spIndexOf(val.address());
             errorArgs[i - 1] = DecompileValueGenerator(cx, spIndex, val, NullPtr(), 1);
         }
     }
 
     JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, errorNumber,
                          errorArgs[0], errorArgs[1], errorArgs[2]);
-    for (uint32_t i = 0; i < 3; i++)
+    for (unsigned i = 0; i < 3; i++)
         cx->free_(errorArgs[i]);
     return false;
 }
 
 JSFunctionSpec intrinsic_functions[] = {
     JS_FN("ToObject",       intrinsic_ToObject,     1,0),
     JS_FN("ToInteger",      intrinsic_ToInteger,    1,0),
     JS_FN("IsCallable",     intrinsic_IsCallable,   1,0),