first_stage_console: Address compiler warning

Re-order the fields in the declaration to address the following

  ISO C++ requires field designators to be specified in declaration order;
  field 'sigaction::(anonymous union at bionic/libc/include/bits/signal_types.h:76:20)'
  will be initialized after field 'sa_flags' [-Wreorder-init-list]

Test: TH
Change-Id: I3f1d4739f1677aad50d4f07361aa264da43bdd13
This commit is contained in:
Pierre-Clément Tosi 2024-02-12 16:00:44 +00:00
parent 161b80bd02
commit 914ccc5664

View file

@ -86,7 +86,9 @@ namespace init {
void StartConsole(const std::string& cmdline) {
bool console = KernelConsolePresent(cmdline);
// Use a simple sigchld handler -- first_stage_console doesn't need to track or log zombies
const struct sigaction chld_act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDWAIT };
const struct sigaction chld_act {
.sa_flags = SA_NOCLDWAIT, .sa_handler = SIG_DFL
};
sigaction(SIGCHLD, &chld_act, nullptr);
pid_t pid = fork();