From 4314bacc3f576958bda880d54b10fd81409a2121 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 4 Mar 2015 11:52:51 +0000 Subject: [PATCH 6/7] signal_handler: avoid signed/unsigned mismatch (-Wsign-compare) We're ignoring the result of this write() to stderr anyway, because if it failed... what would we do? Write to stderr? That wouldn't work any better the second time :-) --- bus/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bus/main.c b/bus/main.c index b48f03f..ad02b97 100644 --- a/bus/main.c +++ b/bus/main.c @@ -87,7 +87,8 @@ signal_handler (int sig) static const char message[] = "Unable to write to reload pipe - buffer full?\n"; - if (write (STDERR_FILENO, message, strlen (message)) != strlen (message)) + if (write (STDERR_FILENO, message, strlen (message)) != + (ssize_t) strlen (message)) { /* ignore failure to write out a warning */ } @@ -111,7 +112,8 @@ signal_handler (int sig) "Unable to write termination signal to pipe - buffer full?\n" "Will exit instead.\n"; - if (write (STDERR_FILENO, message, strlen (message)) != strlen (message)) + if (write (STDERR_FILENO, message, strlen (message)) != + (ssize_t) strlen (message)) { /* ignore failure to write out a warning */ } -- 2.1.4