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
Loading
Please register or sign in to comment