DescriptionInitialize 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
Committed: https://skia.googlesource.com/skia/+/71d7f7f002332b9904bf12eb3f1908883f99120e
Patch Set 1 #
Messages
Total messages: 10 (4 generated)
|