From d2b5359fa9ce5fb121ce84460841eb6e9b927fee Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 4 Jan 2026 01:03:48 +0100 Subject: [PATCH] UnixSignalWatcher: Ignore -Wunused-result --- src/core/unixsignalwatcher.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/unixsignalwatcher.cpp b/src/core/unixsignalwatcher.cpp index 8539fddc4..766266711 100644 --- a/src/core/unixsignalwatcher.cpp +++ b/src/core/unixsignalwatcher.cpp @@ -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 }