Bug 630290 - Fixing compiler warnings. r=cjones
authorAtul Aggarwal <atulagrwl@gmail.com>
Sun, 06 Nov 2011 21:15:44 +0530
changeset 80470 1145823819dc60d55270aabc754b03dc3a2b1f56
parent 80469 5f4bb56e4049569ec07ef1ca54811ef2bf8d10bc
child 80471 cde201b0e581535ae5ae3160431eb31382593525
push id21500
push userbmo@edmorley.co.uk
push dateSat, 19 Nov 2011 13:04:35 +0000
treeherdermozilla-central@46c2bd7dbdd4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs630290
milestone11.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 630290 - Fixing compiler warnings. r=cjones
xpcom/tests/TestObserverArray.cpp
xpcom/tests/TestTArray.cpp
--- a/xpcom/tests/TestObserverArray.cpp
+++ b/xpcom/tests/TestObserverArray.cpp
@@ -77,17 +77,17 @@ int main(int argc, char **argv)
   }
 
   int rv = 0;
 
   Array arr;
   arr.AppendElement(3);
   arr.AppendElement(4);
 
-  int count;
+  size_t count;
   int testNum = 0;
 
   // Basic sanity
   static int test1Expected[] = { 3, 4 };
   DO_TEST(ForwardIterator, test1Expected, );
 
   // Appends
   static int test2Expected[] = { 3, 4, 2 };
--- a/xpcom/tests/TestTArray.cpp
+++ b/xpcom/tests/TestTArray.cpp
@@ -628,17 +628,17 @@ static bool test_heap() {
       printf("%s:%d CHECK_EQ_INT(%s=%u, %s=%u) failed.\n",                   \
              __FILE__, __LINE__, #actual, (actual), #expected, (expected));  \
       return false;                                                       \
     }                                                                        \
   } while(0)
 
 #define CHECK_ARRAY(arr, data) \
   do {                                                          \
-    CHECK_EQ_INT((arr).Length(), ArrayLength(data));            \
+    CHECK_EQ_INT((arr).Length(), (PRUint32)ArrayLength(data));  \
     for (PRUint32 _i = 0; _i < ArrayLength(data); _i++) {       \
       CHECK_EQ_INT((arr)[_i], (data)[_i]);                      \
     }                                                           \
   } while(0)
 
 static bool test_swap() {
   // Test nsTArray::SwapElements.  Unfortunately there are many cases.
   int data1[] = {8, 6, 7, 5};