Eliminate Linux compile warnings throughout animator/ with variable
initializations, missing braces.
git-svn-id: http://skia.googlecode.com/svn/trunk@1991 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/animator/SkScriptTokenizer.cpp b/src/animator/SkScriptTokenizer.cpp
index 9224435..b7c1634 100644
--- a/src/animator/SkScriptTokenizer.cpp
+++ b/src/animator/SkScriptTokenizer.cpp
@@ -505,8 +505,9 @@
}
lastPush = false;
continue;
- } else
+ } else {
SkASSERT(token_length(script) > 0);
+ }
}
if (lastPush != false && fTokenLength > 0) {
if (ch == '(') {
@@ -1038,8 +1039,9 @@
SkASSERT(fValueStack.top().fType == SkOperand2::kS32); // !!! add error handling, and conversion to int?
addTokenValue(fValueStack.top(), kAccumulator);
fValueStack.pop();
- } else
+ } else {
SkASSERT(fAccumulatorType == SkOperand2::kS32);
+ }
// if 'and', write beq goto opcode after end of predicate (after to bool)
// if 'or', write bne goto to bool
addToken(op == kLogicalAnd ? kLogicalAndInt : kLogicalOrInt);
@@ -1133,8 +1135,8 @@
else if (value2.fType == SkOperand2::kString)
typeOp = (TypeOp) (typeOp + 2);
SkDynamicMemoryWStream stream;
- SkOperand2::OpType saveType;
- SkBool saveOperand;
+ SkOperand2::OpType saveType = SkOperand2::kNoType;
+ SkBool saveOperand = false;
if (constantOperands) {
fActiveStream = &stream;
saveType = fAccumulatorType;