Bug 858304: Fix 2 signed/unsigned comparison warnings in QuartzSupport.mm. r=smichaud
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 04 Apr 2013 18:20:44 -0700
changeset 127739 2edc2af0ec32bdaad1900b2459f928536920c257
parent 127738 503dea706f82dcc671e73aae1b2ce8226bec8bb9
child 127740 bf47d3b3d6c1b0a6f30c628fb3a08eaf3efe54a7
push id24512
push userryanvm@gmail.com
push dateFri, 05 Apr 2013 20:13:49 +0000
treeherdermozilla-central@139b6ba547fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs858304
milestone23.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 858304: Fix 2 signed/unsigned comparison warnings in QuartzSupport.mm. r=smichaud
gfx/2d/QuartzSupport.mm
--- a/gfx/2d/QuartzSupport.mm
+++ b/gfx/2d/QuartzSupport.mm
@@ -935,18 +935,18 @@ nsresult nsCARenderer::DrawSurfaceToCGCo
 
   // We get rendering glitches if we use a width/height that falls
   // outside of the IOSurface.
   if (aWidth + aX > ioWidth) 
     aWidth = ioWidth - aX;
   if (aHeight + aY > ioHeight) 
     aHeight = ioHeight - aY;
 
-  if (aX < 0 || aX >= ioWidth ||
-      aY < 0 || aY >= ioHeight) {
+  if (aX < 0 || static_cast<size_t>(aX) >= ioWidth ||
+      aY < 0 || static_cast<size_t>(aY) >= ioHeight) {
     surf->Unlock();
     return NS_ERROR_FAILURE;
   }
 
   void* ioData = surf->GetBaseAddress();
   double scaleFactor = surf->GetContentsScaleFactor();
   size_t intScaleFactor = ceil(surf->GetContentsScaleFactor());
   CGDataProviderRef dataProvider = ::CGDataProviderCreateWithData(ioData,