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

Commit 914ccc56 authored by Pierre-Clément Tosi's avatar Pierre-Clément Tosi
Browse files

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
parent 161b80bd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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();