Merge "crash_dump: fix warnings, turn on -Werror."

am: c5933ed960

Change-Id: Id658632ea8fedc8598b5ac6939e7e9bf0bd0d22e
This commit is contained in:
Josh Gao 2017-03-13 22:43:59 +00:00 committed by android-build-merger
commit 8412dac88c
3 changed files with 6 additions and 5 deletions

View file

@ -3,7 +3,7 @@ cc_defaults {
cflags: [ cflags: [
"-Wall", "-Wall",
"-Wextra", "-Wextra",
"-Wno-error", "-Werror",
"-Wno-nullability-completeness", "-Wno-nullability-completeness",
"-Os", "-Os",
], ],

View file

@ -199,10 +199,6 @@ int main(int argc, char** argv) {
pid_t main_tid; pid_t main_tid;
pid_t pseudothread_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())) { if (!android::base::ParseInt(argv[1], &main_tid, 1, std::numeric_limits<pid_t>::max())) {
LOG(FATAL) << "invalid main tid: " << argv[1]; LOG(FATAL) << "invalid main tid: " << argv[1];
} }
@ -211,6 +207,10 @@ int main(int argc, char** argv) {
LOG(FATAL) << "invalid pseudothread tid: " << argv[2]; 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; android::procinfo::ProcessInfo target_info;
if (!android::procinfo::GetProcessInfo(main_tid, &target_info)) { if (!android::procinfo::GetProcessInfo(main_tid, &target_info)) {
LOG(FATAL) << "failed to fetch process info for target " << main_tid; LOG(FATAL) << "failed to fetch process info for target " << main_tid;

View file

@ -43,6 +43,7 @@ void engrave_tombstone_ucontext(int tombstone_fd, uintptr_t abort_msg_address, s
ucontext_t* ucontext); ucontext_t* ucontext);
// Compatibility shim. // Compatibility shim.
__attribute__((__unused__))
static void engrave_tombstone_ucontext(int tombstone_fd, pid_t, pid_t, uintptr_t abort_msg_address, static void engrave_tombstone_ucontext(int tombstone_fd, pid_t, pid_t, uintptr_t abort_msg_address,
siginfo_t* siginfo, ucontext_t* ucontext) { siginfo_t* siginfo, ucontext_t* ucontext) {
engrave_tombstone_ucontext(tombstone_fd, abort_msg_address, siginfo, ucontext); engrave_tombstone_ucontext(tombstone_fd, abort_msg_address, siginfo, ucontext);