Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67d52aa0 authored by Nick Desaulniers's avatar Nick Desaulniers
Browse files

[debuggerd] fix -Wreorder-init-list



C++20 wants members to be ordered unlike C99.

Bug: 139945549
Test: mm
Change-Id: I3cbca589511c1e0bbc10c691949e18de77e16031
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 9186612f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;
+4 −1
Original line number Diff line number Diff line
@@ -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)) {
+1 −1
Original line number Diff line number Diff line
@@ -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),
+1 −1
Original line number Diff line number Diff line
@@ -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());