Fix GCC warnings about using CHECK_EQUAL macro to compare a pointer to NULL. no_r=red.
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 29 Sep 2011 15:52:05 -0500
changeset 77881 ba2d3e4cd88a56d679be1577ab907e15cdb6f2d1
parent 77880 071c48a989bb43092da6db95f2f4358ef6e16b97
child 77882 fa844d57e842993c8d3fb94837bcdcc89d254cc8
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
milestone10.0a1
Fix GCC warnings about using CHECK_EQUAL macro to compare a pointer to NULL. no_r=red.
js/src/jsapi-tests/testDebugger.cpp
--- a/js/src/jsapi-tests/testDebugger.cpp
+++ b/js/src/jsapi-tests/testDebugger.cpp
@@ -292,32 +292,32 @@ BEGIN_TEST(testDebugger_singleStepThrow)
         return JSTRAP_CONTINUE;
     }
 END_TEST(testDebugger_singleStepThrow)
 
 BEGIN_TEST(testDebugger_emptyObjectPropertyIterator)
 {
     JSObject *obj = JS_NewObject(cx, NULL, NULL, NULL);
     JSScopeProperty *prop = NULL;
-    CHECK_EQUAL(JS_PropertyIterator(obj, &prop), NULL);
-    CHECK_EQUAL(prop, NULL);
+    CHECK(!JS_PropertyIterator(obj, &prop));
+    CHECK(!prop);
 
     return true;
 }
 END_TEST(testDebugger_emptyObjectPropertyIterator)
 
 BEGIN_TEST(testDebugger_nonEmptyObjectPropertyIterator)
 {
     jsval v;
     EVAL("({a: 15})", &v);
     JSObject *obj = JSVAL_TO_OBJECT(v);
     JSScopeProperty *prop = NULL;
     CHECK(JS_PropertyIterator(obj, &prop));
     JSPropertyDesc desc;
     CHECK(JS_GetPropertyDesc(cx, obj, prop, &desc));
     CHECK_EQUAL(JSVAL_IS_INT(desc.value), true);
     CHECK_EQUAL(JSVAL_TO_INT(desc.value), 15);
-    CHECK_EQUAL(JS_PropertyIterator(obj, &prop), NULL);
-    CHECK_EQUAL(prop, NULL);
+    CHECK(!JS_PropertyIterator(obj, &prop));
+    CHECK(!prop);
 
     return true;
 }
 END_TEST(testDebugger_nonEmptyObjectPropertyIterator)