UnixSignalWatcher: Ignore -Wunused-result

This commit is contained in:
Jonas Kvinge
2026-01-04 01:03:48 +01:00
parent 1d82977441
commit d2b5359fa9

View File

@@ -140,7 +140,14 @@ void UnixSignalWatcher::SignalHandler(const int signal) {
// Write the signal number to the socket pair (async-signal-safe)
// This is the only operation we perform in the signal handler
// Ignore errors as there's nothing we can safely do about them in a signal handler
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result"
#endif
(void)::write(sInstance->signal_fd_[1], &signal, sizeof(signal));
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}