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

Commit ac8b5bd0 authored by Bart Van Assche's avatar Bart Van Assche
Browse files

init: Fix a compiler warning



Fix the following compiler warning:

system/core/init/init.cpp:754:57: warning: ISO C++ requires field designators to be specified in declaration order; field '' will be initialized after field 'sa_flags' [-Wreorder-init-list]
    const struct sigaction act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDSTOP };
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
system/core/init/init.cpp:754:34: note: previous initialization for field '' is here
    const struct sigaction act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDSTOP };
                                 ^~~~~~~~~~~~~~~~~~~~~

Change-Id: I29e2d51dfdff85212a33eebfd51b241268cdfe9a
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 8ebc8257
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -751,7 +751,7 @@ static void UnblockSignals() {
static void InstallSignalFdHandler(Epoll* epoll) {
    // Applying SA_NOCLDSTOP to a defaulted SIGCHLD handler prevents the signalfd from receiving
    // SIGCHLD when a child process stops or continues (b/77867680#comment9).
    const struct sigaction act { .sa_handler = SIG_DFL, .sa_flags = SA_NOCLDSTOP };
    const struct sigaction act { .sa_flags = SA_NOCLDSTOP, .sa_handler = SIG_DFL };
    sigaction(SIGCHLD, &act, nullptr);

    sigset_t mask;