Fix error meessages in DexFile::ChangePermissions() and mem_map.cc.
Change-Id: I9be999b61b0fca1ab9cad7521346681d2370f1c4
diff --git a/src/dex_file.cc b/src/dex_file.cc
index 3ba671e..cca1a30 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -96,7 +96,7 @@
}
void DexFile::ChangePermissions(int prot) const {
- mem_map_->Protect(prot);
+ CHECK(mem_map_->Protect(prot)) << GetLocation();
}
const DexFile* DexFile::OpenFile(const std::string& filename,
diff --git a/src/mem_map.cc b/src/mem_map.cc
index 8201fa8..d3ebd4a 100644
--- a/src/mem_map.cc
+++ b/src/mem_map.cc
@@ -233,7 +233,8 @@
return true;
}
- PLOG(ERROR) << "mprotect(" << base_begin_ << ", " << base_size_ << ", " << prot << ") failed";
+ PLOG(ERROR) << "mprotect(" << reinterpret_cast<void*>(base_begin_) << ", " << base_size_ << ", "
+ << prot << ") failed";
return false;
}