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
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp
index b3c73d7..4752ed1 100644
--- a/samplecode/SampleTiling.cpp
+++ b/samplecode/SampleTiling.cpp
@@ -22,7 +22,7 @@
     bm->eraseColor(0);
     
     SkCanvas    canvas(*bm);
-    SkPoint     pts[] = { 0, 0, SkIntToScalar(w), SkIntToScalar(h) };
+    SkPoint     pts[] = { { 0, 0 }, { SkIntToScalar(w), SkIntToScalar(h) } };
     SkColor     colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
     SkScalar    pos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
     SkPaint     paint;
@@ -62,7 +62,7 @@
 	TilingView()
             : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2),
                       0x88000000) {
-        for (int i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
+        for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
             makebm(&fTexture[i], gConfigs[i], gWidth, gHeight);
         }
     }
@@ -99,8 +99,8 @@
         }
 
         if (textCanvas) {
-            for (int kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) {
-                for (int ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) {
+            for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) {
+                for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) {
                     SkPaint p;
                     SkString str;
                     p.setAntiAlias(true);
@@ -118,11 +118,11 @@
         
         y += SkIntToScalar(16);
 
-        for (int i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
-            for (int j = 0; j < SK_ARRAY_COUNT(gFilters); j++) {
+        for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
+            for (size_t j = 0; j < SK_ARRAY_COUNT(gFilters); j++) {
                 x = SkIntToScalar(10);
-                for (int kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) {
-                    for (int ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) {
+                for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) {
+                    for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) {
                         SkPaint paint;
                         setup(&paint, fTexture[i], gFilters[j], gModes[kx], gModes[ky]);
                         paint.setDither(true);