Bug 759770 - Fix build error when warnings-as-errors in nsSVGUtils.cpp. r=dholbert
authorMounir Lamouri <mounir.lamouri@gmail.com>
Fri, 01 Jun 2012 11:48:39 +0200
changeset 97642 cb648ec7d7f2b2997d664546555e551715ee5e36
parent 97641 73783bf75c4cb7a186f4b59e0b0f918a3d7839ff
child 97643 7bf0125b26b564ebcd549606d2f0b9c212860aae
push idunknown
push userunknown
push dateunknown
reviewersdholbert
bugs759770
milestone15.0a1
Bug 759770 - Fix build error when warnings-as-errors in nsSVGUtils.cpp. r=dholbert
layout/svg/base/src/nsSVGUtils.cpp
--- a/layout/svg/base/src/nsSVGUtils.cpp
+++ b/layout/svg/base/src/nsSVGUtils.cpp
@@ -47,16 +47,17 @@
 #include "nsSVGLength2.h"
 #include "nsSVGMaskFrame.h"
 #include "nsSVGOuterSVGFrame.h"
 #include "nsSVGPathGeometryElement.h"
 #include "nsSVGPathGeometryFrame.h"
 #include "nsSVGSVGElement.h"
 #include "nsSVGTextContainerFrame.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
+#include "mozilla/unused.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 // c = n / 255
 // (c <= 0.0031308 ? c * 12.92 : 1.055 * pow(c, 1 / 2.4) - 0.055) * 255 + 0.5
 static const PRUint8 glinearRGBTosRGBMap[256] = {
@@ -1664,19 +1665,19 @@ nsSVGUtils::WritePPM(const char *fname, 
     return;
 
   gfxIntSize size = aSurface->GetSize();
   fprintf(f, "P6\n%d %d\n255\n", size.width, size.height);
   unsigned char *data = aSurface->Data();
   PRInt32 stride = aSurface->Stride();
   for (int y=0; y<size.height; y++) {
     for (int x=0; x<size.width; x++) {
-      fwrite(data + y * stride + 4 * x + GFX_ARGB32_OFFSET_R, 1, 1, f);
-      fwrite(data + y * stride + 4 * x + GFX_ARGB32_OFFSET_G, 1, 1, f);
-      fwrite(data + y * stride + 4 * x + GFX_ARGB32_OFFSET_B, 1, 1, f);
+      unused << fwrite(data + y * stride + 4 * x + GFX_ARGB32_OFFSET_R, 1, 1, f);
+      unused << fwrite(data + y * stride + 4 * x + GFX_ARGB32_OFFSET_G, 1, 1, f);
+      unused << fwrite(data + y * stride + 4 * x + GFX_ARGB32_OFFSET_B, 1, 1, f);
     }
   }
   fclose(f);
 }
 #endif
 
 gfxMatrix
 nsSVGUtils::GetStrokeTransform(nsIFrame *aFrame)