From 3af9b108909ee1e138cb8b3b6659563ab763e038 Mon Sep 17 00:00:00 2001 From: Tom Englund Date: Sun, 5 Apr 2026 15:45:27 +0200 Subject: internal: silence compiler warnings about unused return values (#13997) * misc: silence warnings about ignoring return value on reads silence warnings on ignored return values on read() and print an error if it occurs. * misc: silence warnings about ignoring return value on writes silence warnings on ignored return values on write() and print an error where we can, or pass them the maybe_unused attribute. * misc: silence warnings about ignoring return value on pipe silence warnings on ignored return value on pipe(), print an error and exit on failure. --- src/debug/crash/CrashReporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/debug/crash/CrashReporter.cpp') diff --git a/src/debug/crash/CrashReporter.cpp b/src/debug/crash/CrashReporter.cpp index fad6ad21..5b7931f3 100644 --- a/src/debug/crash/CrashReporter.cpp +++ b/src/debug/crash/CrashReporter.cpp @@ -43,7 +43,7 @@ static char const* getRandomMessage() { } [[noreturn]] static inline void exitWithError(char const* err) { - write(STDERR_FILENO, err, strlen(err)); + [[maybe_unused]] auto w = write(STDERR_FILENO, err, strlen(err)); // perror() is not signal-safe, but we use it here // because if the crash-handler already crashed, it can't get any worse. perror(""); -- cgit v1.2.3