crash_dump: fix warnings, turn on -Werror.
Test: mma
Change-Id: I0722fef7b513be976cbbe89f73e8bb7138a80442
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp
index 57a6c44..38b711f 100644
--- a/debuggerd/crash_dump.cpp
+++ b/debuggerd/crash_dump.cpp
@@ -199,10 +199,6 @@
pid_t main_tid;
pid_t pseudothread_tid;
- if (target == 1) {
- LOG(FATAL) << "target died before we could attach (received main tid = " << main_tid << ")";
- }
-
if (!android::base::ParseInt(argv[1], &main_tid, 1, std::numeric_limits<pid_t>::max())) {
LOG(FATAL) << "invalid main tid: " << argv[1];
}
@@ -211,6 +207,10 @@
LOG(FATAL) << "invalid pseudothread tid: " << argv[2];
}
+ if (target == 1) {
+ LOG(FATAL) << "target died before we could attach (received main tid = " << main_tid << ")";
+ }
+
android::procinfo::ProcessInfo target_info;
if (!android::procinfo::GetProcessInfo(main_tid, &target_info)) {
LOG(FATAL) << "failed to fetch process info for target " << main_tid;