Initialize three locals to avoid the risk of uninitialized reads.
authorbrucedawson <brucedawson@chromium.org>
Thu, 26 Feb 2015 21:28:53 +0000 (13:28 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 26 Feb 2015 21:28:53 +0000 (13:28 -0800)
commit71d7f7f002332b9904bf12eb3f1908883f99120e
treed52a7b9bd64a97be9d006aa016ffb8f2cf928a2a
parente6cf9cb68511ff08156f834859db39232eb37be8
Initialize three locals to avoid the risk of uninitialized reads.

/analyze recently reported two new warnings about reading from
potentially uninitialized local variables:

src\third_party\skia\src\gpu\grclipmaskmanager.cpp(290) :
warning C6001: Using uninitialized memory 'requiresAA'.
src\third_party\skia\src\gpu\grclipmaskmanager.cpp(336) :
warning C6001: Using uninitialized memory 'genID'.

It is not clear whether the uninitialized reads can actually happen,
but the guarantees seem sufficiently non-obvious that the prudent thing
to do to guarantee future stability is to initialized them -- it's
cheap. I also initialized initialState because it seemed to fall in
the same class, despite there being no warning for it.

BUG=427616

Review URL: https://codereview.chromium.org/957133002
src/gpu/GrClipMaskManager.cpp