[debuggerd] fix -Wreorder-init-list
C++20 wants members to be ordered unlike C99. Bug: 139945549 Test: mm Change-Id: I3cbca589511c1e0bbc10c691949e18de77e16031 Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
This commit is contained in:
parent
9186612f9a
commit
67d52aa0f6
4 changed files with 10 additions and 4 deletions
|
|
@ -195,7 +195,10 @@ bool debuggerd_trigger_dump(pid_t tid, DebuggerdDumpType dump_type, unsigned int
|
|||
return false;
|
||||
}
|
||||
|
||||
InterceptRequest req = {.pid = pid, .dump_type = dump_type};
|
||||
InterceptRequest req = {
|
||||
.dump_type = dump_type,
|
||||
.pid = pid,
|
||||
};
|
||||
if (!set_timeout(sockfd)) {
|
||||
PLOG(ERROR) << "libdebugger_client: failed to set timeout";
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,10 @@ static void tombstoned_intercept(pid_t target_pid, unique_fd* intercept_fd, uniq
|
|||
FAIL() << "failed to contact tombstoned: " << strerror(errno);
|
||||
}
|
||||
|
||||
InterceptRequest req = {.pid = target_pid, .dump_type = intercept_type};
|
||||
InterceptRequest req = {
|
||||
.dump_type = intercept_type,
|
||||
.pid = target_pid,
|
||||
};
|
||||
|
||||
unique_fd output_pipe_write;
|
||||
if (!Pipe(output_fd, &output_pipe_write)) {
|
||||
|
|
|
|||
|
|
@ -525,8 +525,8 @@ static void debuggerd_signal_handler(int signal_number, siginfo_t* info, void* c
|
|||
log_signal_summary(info);
|
||||
|
||||
debugger_thread_info thread_info = {
|
||||
.pseudothread_tid = -1,
|
||||
.crashing_tid = __gettid(),
|
||||
.pseudothread_tid = -1,
|
||||
.siginfo = info,
|
||||
.ucontext = context,
|
||||
.abort_msg = reinterpret_cast<uintptr_t>(abort_message),
|
||||
|
|
|
|||
|
|
@ -345,9 +345,9 @@ TEST_F(TombstoneTest, dump_header_info) {
|
|||
|
||||
TEST_F(TombstoneTest, dump_thread_info_uid) {
|
||||
dump_thread_info(&log_, ThreadInfo{.uid = 1,
|
||||
.pid = 2,
|
||||
.tid = 3,
|
||||
.thread_name = "some_thread",
|
||||
.pid = 2,
|
||||
.process_name = "some_process"});
|
||||
std::string expected = "pid: 2, tid: 3, name: some_thread >>> some_process <<<\nuid: 1\n";
|
||||
ASSERT_STREQ(expected.c_str(), amfd_data_.c_str());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue