diff options
author | MÃ¥rten Kongstad <marten.kongstad@sony.com> | 2019-09-27 10:00:18 +0200 |
---|---|---|
committer | Todd Kennedy <toddke@google.com> | 2019-10-01 01:56:46 -0700 |
commit | dd63e5d256ce7f1256ac500e239f1898ab0c246f (patch) | |
tree | 420fa98e18faad8147ea17e134cf06632189237c /tests/Codegen/src/com/android/codegentest/SampleDataClassTest.java | |
parent | c087fbc6f4837ddf0d2d69551bb89277eef150ae (diff) |
idmap2: assign uninitialized variables initial values
In C++, local primitives are not automatically initialized:
void foo() {
int i; // primitive: value is indeterminate
std::string s; // class: calls default ctor
...
}
Create.cpp and Dump.cpp include this type of uninitialized variable; fix
this by explicitly assigning an initial value.
Also add a new script to help catch these types of errors in the future:
valgrind.sh, which will run a few idmap2 commands and the idmap2_tests
through Valgrind.
Also update static-checks.sh to rely on a command's return value instead
of the presence of any output.
Test: frameworks/base/cmds/idmap2/valgrind.sh
Change-Id: Ic9dbd3e9a768beb39ac677ff294b0fca5ee8f9d2
Diffstat (limited to 'tests/Codegen/src/com/android/codegentest/SampleDataClassTest.java')
0 files changed, 0 insertions, 0 deletions