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/src/animator/SkDisplayApply.cpp b/src/animator/SkDisplayApply.cpp
index b9e65f7..8aca71f 100644
--- a/src/animator/SkDisplayApply.cpp
+++ b/src/animator/SkDisplayApply.cpp
@@ -294,7 +294,7 @@
     if ((mode == kMode_immediate || mode == kMode_create) && scope == NULL)
         return false;   // !!! error?
     bool enableMe = scope && (scope->hasEnable() || scope->isApply() || scope->isDrawable() == false);
-    if (mode == kMode_immediate && enableMe || mode == kMode_create)
+    if ((mode == kMode_immediate && enableMe) || mode == kMode_create)
         activate(maker);    // for non-drawables like post, prime them here
     if (mode == kMode_immediate && enableMe)
         fActive->enable();
@@ -479,7 +479,7 @@
     } else {
         SkScriptValue scriptValue;
         bool success = target->getProperty(info->propertyIndex(), &scriptValue);
-        SkASSERT(success = true);
+        SkASSERT(success == true);
         last[0] = scriptValue.fOperand;
         scriptValue.fOperand = fActive->fSaveRestore[activeIndex][0];
         target->setProperty(info->propertyIndex(), scriptValue);
@@ -624,8 +624,8 @@
         SkInterpolatorBase::Result interpResult = fActive->fInterpolators[inner]->timeToValues(
             innerTime, values.get());
         result |= (interpResult != SkInterpolatorBase::kFreezeEnd_Result);
-        if ((transition != SkApply::kTransition_reverse && interpResult == SkInterpolatorBase::kFreezeEnd_Result ||
-                transition == SkApply::kTransition_reverse && fLastTime == 0) && state.fUnpostedEndEvent) {
+        if (((transition != SkApply::kTransition_reverse && interpResult == SkInterpolatorBase::kFreezeEnd_Result) ||
+                (transition == SkApply::kTransition_reverse && fLastTime == 0)) && state.fUnpostedEndEvent) {
 //          SkDEBUGF(("interpolate: post on end\n"));
             state.fUnpostedEndEvent = false;
             maker.postOnEnd(animate, state.fBegin + state.fDuration);