Merge "Fix idmap2 uninitialized variables" am: 6982a7dc69

Change-Id: If120ed5b4deb24b8b6e5a90ddcec986365736545
This commit is contained in:
Treehugger Robot
2020-03-24 02:08:54 +00:00
committed by Automerger Merge Worker
3 changed files with 2 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ Result<Unit> Create(const std::vector<std::string>& args) {
std::string overlay_apk_path; std::string overlay_apk_path;
std::string idmap_path; std::string idmap_path;
std::vector<std::string> policies; std::vector<std::string> policies;
bool ignore_overlayable; bool ignore_overlayable = false;
const CommandLineOptions opts = const CommandLineOptions opts =
CommandLineOptions("idmap2 create") CommandLineOptions("idmap2 create")

View File

@@ -39,7 +39,7 @@ using android::idmap2::Unit;
Result<Unit> Dump(const std::vector<std::string>& args) { Result<Unit> Dump(const std::vector<std::string>& args) {
SYSTRACE << "Dump " << args; SYSTRACE << "Dump " << args;
std::string idmap_path; std::string idmap_path;
bool verbose; bool verbose = false;
const CommandLineOptions opts = const CommandLineOptions opts =
CommandLineOptions("idmap2 dump") CommandLineOptions("idmap2 dump")

View File

@@ -131,7 +131,6 @@ TEST_F(Idmap2BinaryTests, Dump) {
ASSERT_NE(result->stdout.find("0x7f02000c -> 0x7f020000 string/str1"), std::string::npos); ASSERT_NE(result->stdout.find("0x7f02000c -> 0x7f020000 string/str1"), std::string::npos);
ASSERT_NE(result->stdout.find("0x7f02000e -> 0x7f020001 string/str3"), std::string::npos); ASSERT_NE(result->stdout.find("0x7f02000e -> 0x7f020001 string/str3"), std::string::npos);
ASSERT_NE(result->stdout.find("0x7f02000f -> 0x7f020002 string/str4"), std::string::npos); ASSERT_NE(result->stdout.find("0x7f02000f -> 0x7f020002 string/str4"), std::string::npos);
ASSERT_EQ(result->stdout.find("00000210: 007f target package id"), std::string::npos);
// clang-format off // clang-format off
result = ExecuteBinary({"idmap2", result = ExecuteBinary({"idmap2",