Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f61b7786 authored by George Burgess IV's avatar George Burgess IV Committed by Arne Coucheron
Browse files

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
parent f3c417cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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());