From f41ae54333e7bb2dee4e773005a32f0b182df445 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= <vladimir.cunat@nic.cz>
Date: Mon, 17 Sep 2018 12:24:36 +0200
Subject: [PATCH] main: locally disable a gcc warning since !672

I see no use to handle write() return codes in *this* function.
---
 daemon/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/daemon/main.c b/daemon/main.c
index a414b2627..3981c8c9b 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -311,6 +311,9 @@ static void sigbus_handler(int sig, siginfo_t *siginfo, void *ptr)
 	 */
 	#define WRITE_ERR(err_charray) \
 		(void)write(STDERR_FILENO, err_charray, sizeof(err_charray))
+	/* Unfortunately, void-cast on the write isn't enough to avoid the warning. */
+	#pragma GCC diagnostic push
+	#pragma GCC diagnostic ignored "-Wunused-result"
 	const char msg_typical[] =
 		"\nSIGBUS received; this is most likely due to filling up the filesystem where cache resides.\n",
 		msg_unknown[] = "\nSIGBUS received, cause unknown.\n",
@@ -332,6 +335,7 @@ static void sigbus_handler(int sig, siginfo_t *siginfo, void *ptr)
 	WRITE_ERR(msg_final);
 	_exit(128 - sig); /*< regular return from OS-raised SIGBUS can't work anyway */
 	#undef WRITE_ERR
+	#pragma GCC diagnostic pop
 }
 
 /** Split away port from the address. */
-- 
GitLab