[Bug 914955] Fix build warnings in Moz2D r=bas
authorDavid Zbarsky <dzbarsky@gmail.com>
Sun, 15 Sep 2013 14:23:51 -0400
changeset 160179 d46ddeb2962728f154aaf6a679574d228b87ce16
parent 160178 75196fdc7e21d61206312b3bfb3003bbb61c5250
child 160180 72f8d310a7235e48d1a6656295cd1a72b5a30240
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs914955
milestone26.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 914955] Fix build warnings in Moz2D r=bas
gfx/2d/DrawTargetSkia.cpp
gfx/2d/SourceSurfaceCG.cpp
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -94,17 +94,17 @@ static void
 SetCacheLimits()
 {
   std::vector<DrawTargetSkia*>& targets = GLDrawTargets();
   uint32_t size = targets.size();
   if (size == 0)
     return;
 
   int individualCacheSize = SKIA_TOTAL_CACHE_SIZE / size;
-  for (int i = 0; i < size; i++) {
+  for (uint32_t i = 0; i < size; i++) {
     targets[i]->SetCacheLimits(SKIA_MAX_CACHE_ITEMS, individualCacheSize);
   }
 
 }
 
 #undef SKIA_MAX_CACHE_ITEMS
 #undef SKIA_TOTAL_CACHE_SIZE
 
--- a/gfx/2d/SourceSurfaceCG.cpp
+++ b/gfx/2d/SourceSurfaceCG.cpp
@@ -162,17 +162,17 @@ DataSourceSurfaceCG::InitFromData(unsign
   }
 
   void *data = malloc(aStride * aSize.height);
   memcpy(data, aData, aStride * aSize.height);
 
   mImage = CreateCGImage(data, data, aSize, aStride, aFormat);
 
   if (!mImage) {
-    delete data;
+    free(data);
     return false;
   }
 
   return true;
 }
 
 CGContextRef CreateBitmapContextForImage(CGImageRef image)
 {