Bug 726968 - Fix some dom/ build warnings; r=mounir
authorMs2ger <ms2ger@gmail.com>
Tue, 21 Feb 2012 10:34:01 +0100
changeset 88724 b2e52f75b118f0c110c2101a4d46ad4e093807fd
parent 88723 254285dbf95469aeb902d422d12e2def71d77eee
child 88725 be00940ec6459724287713fa329e1f015e3bc438
push id975
push userffxbld
push dateTue, 13 Mar 2012 21:39:16 +0000
treeherdermozilla-aurora@99faebf9dc36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs726968
milestone13.0a1
Bug 726968 - Fix some dom/ build warnings; r=mounir
dom/base/nsDOMWindowUtils.cpp
dom/base/nsGlobalWindowCommands.cpp
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -598,17 +598,17 @@ nsDOMWindowUtils::SendTouchEvent(const n
   event.time = PR_Now();
 
   nsPresContext* presContext = GetPresContext();
   if (!presContext) {
     return NS_ERROR_FAILURE;
   }
   event.touches.SetCapacity(aCount);
   PRInt32 appPerDev = presContext->AppUnitsPerDevPixel();
-  for (int i = 0; i < aCount; ++i) {
+  for (PRUint32 i = 0; i < aCount; ++i) {
     nsIntPoint pt(0, 0);
     pt.x =
       NSAppUnitsToIntPixels(nsPresContext::CSSPixelsToAppUnits(aXs[i]) + offset.x,
                             appPerDev);
     pt.y =
       NSAppUnitsToIntPixels(nsPresContext::CSSPixelsToAppUnits(aYs[i]) + offset.y,
                             appPerDev);
     nsCOMPtr<nsIDOMTouch> t(new nsDOMTouch(aIdentifiers[i],
--- a/dom/base/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -280,17 +280,17 @@ nsSelectMoveScrollCommand::DoCommand(con
         dsti->GetItemType(&itemType);
         if (itemType == nsIDocShellTreeItem::typeChrome) {
           caretOn = false;
         }
       }
     }
   }
 
-  for (int i = 0; i < mozilla::ArrayLength(browseCommands); i++) {
+  for (size_t i = 0; i < ArrayLength(browseCommands); i++) {
     bool forward = !strcmp(aCommandName, browseCommands[i].forward);
     if (forward || !strcmp(aCommandName, browseCommands[i].reverse)) {
       if (caretOn && browseCommands[i].move &&
           NS_SUCCEEDED((selCont->*(browseCommands[i].move))(forward, false))) {
         // adjust the focus to the new caret position
         nsIFocusManager* fm = nsFocusManager::GetFocusManager();
         if (fm) {
           nsCOMPtr<nsIDOMElement> result;