From 64cc579efa7e416c7298ed159d76b074b283c0f9 Mon Sep 17 00:00:00 2001 From: "senorblanco@chromium.org" Date: Thu, 19 May 2011 19:58:58 +0000 Subject: The plain Makefile was using -Wall, but the gyp build wasn't. This CL turns on -Wall -Wextra and -Wno-unused in common.gypi. This revealed a lot of warnings (and some actual bugs), all of which I fixed here. This is pretty mindless stuff for the most part (order of intialization, missing initializers, && within ||, etc), but will allow us to build cleanly with -Wall and -Wextra (and -Werror, if we so choose). I put defaults into switches that were missing cases. I could put in the actual missing enums instead if that's desired. I could also assert on missing enums instead of break, if that's desired. I wasn't sure how to test the stuff in "animator", so that should be looked at a bit more closely. Review URL: http://codereview.appspot.com/4547055/ git-svn-id: http://skia.googlecode.com/svn/trunk@1386 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleRegion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samplecode/SampleRegion.cpp') diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp index 272c722993..822bd6fa47 100644 --- a/samplecode/SampleRegion.cpp +++ b/samplecode/SampleRegion.cpp @@ -235,7 +235,7 @@ protected: canvas->translate(0, SkIntToScalar(200)); - for (int op = 0; op < SK_ARRAY_COUNT(gOps); op++) { + for (size_t op = 0; op < SK_ARRAY_COUNT(gOps); op++) { canvas->drawText(gOps[op].fName, strlen(gOps[op].fName), SkIntToScalar(75), SkIntToScalar(50), textPaint); this->drawRgnOped(canvas, gOps[op].fOp, gOps[op].fColor); -- cgit v1.2.3