diff options
Diffstat (limited to 'src/animator')
-rw-r--r-- | src/animator/SkAnimateSet.cpp | 3 | ||||
-rw-r--r-- | src/animator/SkAnimatorScript.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkBase64.cpp | 3 | ||||
-rw-r--r-- | src/animator/SkDisplayApply.cpp | 3 | ||||
-rw-r--r-- | src/animator/SkMemberInfo.cpp | 5 | ||||
-rw-r--r-- | src/animator/SkScript.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkScriptTokenizer.cpp | 10 |
7 files changed, 18 insertions, 10 deletions
diff --git a/src/animator/SkAnimateSet.cpp b/src/animator/SkAnimateSet.cpp index da27c3b858..d0b4dfc60c 100644 --- a/src/animator/SkAnimateSet.cpp +++ b/src/animator/SkAnimateSet.cpp @@ -78,8 +78,9 @@ void SkSet::onEndElement(SkAnimateMaker& maker) { SkASSERT(fValues.getType() == outType); if (fFieldInfo->fType == SkType_Array) comps = fValues.count(); - else + else { SkASSERT(fValues.count() == comps); + } } if (formula.size() > 0) { comps = 1; diff --git a/src/animator/SkAnimatorScript.cpp b/src/animator/SkAnimatorScript.cpp index 7fdb048f1c..6aae006690 100644 --- a/src/animator/SkAnimatorScript.cpp +++ b/src/animator/SkAnimatorScript.cpp @@ -465,7 +465,7 @@ bool SkAnimatorScript::Unbox(void* m, SkScriptValue* scriptValue) { scriptValue->fOperand.fString = SkNEW_ARGS(SkString, (boxedValue->value)); } break; default: { - const char* id; + const char* id = NULL; bool success = maker->findKey(displayable, &id); SkASSERT(success); scriptValue->fOperand.fString = SkNEW_ARGS(SkString, (id)); diff --git a/src/animator/SkBase64.cpp b/src/animator/SkBase64.cpp index 5f72ac8969..076f6497d8 100644 --- a/src/animator/SkBase64.cpp +++ b/src/animator/SkBase64.cpp @@ -74,7 +74,8 @@ handlePad: padTwo = true; break; } while (byte < 4); - int two, three; + int two = 0; + int three = 0; if (writeDestination) { int one = (uint8_t) (bytes[0] << 2); two = bytes[1]; diff --git a/src/animator/SkDisplayApply.cpp b/src/animator/SkDisplayApply.cpp index d3c24a5670..d54ee2600f 100644 --- a/src/animator/SkDisplayApply.cpp +++ b/src/animator/SkDisplayApply.cpp @@ -138,8 +138,9 @@ void SkApply::applyValues(int animatorIndex, SkOperand* values, int count, animator->packARGB(&values->fScalar, count, &converted); values = converted.begin(); count = converted.count(); - } else + } else { SkASSERT(count == 1); + } } // SkASSERT(type == SkType_ARGB || type == SkType_String ||info->isSettable()); if (type == SkType_String || type == SkType_DynamicString) diff --git a/src/animator/SkMemberInfo.cpp b/src/animator/SkMemberInfo.cpp index 00b4af99e2..7fae5033fd 100644 --- a/src/animator/SkMemberInfo.cpp +++ b/src/animator/SkMemberInfo.cpp @@ -89,8 +89,9 @@ bool SkMemberInfo::getArrayValue(const SkDisplayable* displayable, int index, Sk if (dispArray->values.count() <= index) return false; type = dispArray->values.getType(); - } else + } else { SkASSERT(0); // incomplete + } size_t byteSize = GetSize(type); memcpy(value, valuePtr + index * byteSize, byteSize); return true; @@ -257,7 +258,7 @@ scriptCommon: { SkASSERT(success); if (scriptValue.fType == SkType_Displayable) { if (type == SkType_String) { - const char* charPtr; + const char* charPtr = NULL; maker.findKey(scriptValue.fOperand.fDisplayable, &charPtr); scriptValue.fOperand.fString = new SkString(charPtr); scriptValue.fType = SkType_String; diff --git a/src/animator/SkScript.cpp b/src/animator/SkScript.cpp index e2a79084ca..aa061698e8 100644 --- a/src/animator/SkScript.cpp +++ b/src/animator/SkScript.cpp @@ -184,6 +184,7 @@ SkScriptEngine::SkScriptEngine(SkOpType returnType) : noInitialSuppress.fOperator = kUnassigned; noInitialSuppress.fOpStackDepth = 0; noInitialSuppress.fSuppress = false; + noInitialSuppress.fElse = 0; fSuppressStack.push(noInitialSuppress); *fOpStack.push() = kParen; fTrackArray.appendClear(); @@ -1218,6 +1219,7 @@ flipSuppress: suppress.fSuppress = true; suppress.fOperator = match; suppress.fOpStackDepth = fOpStack.count(); + suppress.fElse = false; fSuppressStack.push(suppress); } else { fTypeStack.pop(); diff --git a/src/animator/SkScriptTokenizer.cpp b/src/animator/SkScriptTokenizer.cpp index 9224435bab..b7c163403c 100644 --- a/src/animator/SkScriptTokenizer.cpp +++ b/src/animator/SkScriptTokenizer.cpp @@ -505,8 +505,9 @@ bool SkScriptEngine2::innerScript(const char** scriptPtr, SkScriptValue2* value) } lastPush = false; continue; - } else + } else { SkASSERT(token_length(script) > 0); + } } if (lastPush != false && fTokenLength > 0) { if (ch == '(') { @@ -1038,8 +1039,9 @@ void SkScriptEngine2::processLogicalOp(Op op) { 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 @@ bool SkScriptEngine2::processOp() { 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; |