From c084fcafec061e45917e5d477d85e41767514c8c Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Fri, 18 Mar 2016 15:53:43 -0500 Subject: [PATCH] ircd: fix a really retarded GCC warning by being anal retentively "standards compliant" --- ircd/ircd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ircd/ircd.c b/ircd/ircd.c index 432931de..bf9e149d 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -174,7 +174,15 @@ print_startup(int pid) /* let the parent process know the initialization was successful * -- jilles */ if (!server_state_foreground) - write(0, ".", 1); + { + if(write(0, ".", 1) < 1) + /* The circumstances in which this could fail are pretty implausible. + * However, this shuts GCC up about warning the result of write is unused, + * and is "standards compliant" behaviour. + * --Elizabeth + */ + abort(); + } if (dup2(1, 0) == -1) abort(); if (dup2(1, 2) == -1)