perfetto: clean up uses of uninitalized memory
We were passing an uninitialized `HandleDescription` to
`UpdateHandleDescription`. `UpdateHandleDescription` requires that the
`handle_` field of `state` is set, so add a constructor to make that
correct by construction.
While we're at it, we were also returning a mostly/completely
uninitialized `HandleDescription` from `GetOrInferHandleDescription`.
this includes some default values that make that less likely in the
future.
Caught by the static analyzer:
system/iorap/src/perfetto/perfetto_consumer.cc:208:27: warning: 1st
function call argument is an uninitialized value
[clang-analyzer-core.CallAndMessage]
Bug: None
Test: TreeHugger
Change-Id: I41fea34dd2d135c9220c04c1f217daafc0273c39
1 file changed