summaryrefslogtreecommitdiff
path: root/libs/hwui/AnimatorManager.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2017-01-10 15:33:57 -0800
committerGeorge Burgess IV <gbiv@google.com>2017-01-10 15:33:57 -0800
commita483173c78fb453b73308a9b44ce54fb3878ed0e (patch)
treef7a669a151ddaa68c77c990ccd6f8bc4244fbbb5 /libs/hwui/AnimatorManager.cpp
parent55dc66dde47a3a84c387352d88fbda429dd3d077 (diff)
Fix a use-of-uninitialized-value warning.
This warning was generated by the static analyzer: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage *mDirtyMask |= animator->dirtyMask(); This can be fixed by initializing dirtyMask before using it in AnimateFunctor. Bug: None Test: Static analyzer no longer complains about this. Change-Id: I892749079cf93a012f1bed059a3f0c8bbaed9d7e
Diffstat (limited to 'libs/hwui/AnimatorManager.cpp')
-rw-r--r--libs/hwui/AnimatorManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/AnimatorManager.cpp b/libs/hwui/AnimatorManager.cpp
index 9d5860ca0d1a..f5bb821f4e23 100644
--- a/libs/hwui/AnimatorManager.cpp
+++ b/libs/hwui/AnimatorManager.cpp
@@ -142,7 +142,7 @@ void AnimatorManager::animateNoDamage(TreeInfo& info) {
}
uint32_t AnimatorManager::animateCommon(TreeInfo& info) {
- uint32_t dirtyMask;
+ uint32_t dirtyMask = 0;
AnimateFunctor functor(info, mAnimationHandle->context(), &dirtyMask);
auto newEnd = std::remove_if(mAnimators.begin(), mAnimators.end(), functor);
mAnimators.erase(newEnd, mAnimators.end());