From: Simon McVittie Date: Wed, 4 Mar 2015 11:52:51 +0000 (+0000) Subject: signal_handler: avoid signed/unsigned mismatch (-Wsign-compare) X-Git-Tag: dbus-1.9.16~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d42526efa4b0249e169f844c894fb13b1fc6fd3;p=thirdparty%2Fdbus.git 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 :-) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Ralf Habacker --- diff --git a/bus/main.c b/bus/main.c index b48f03f3d..ad02b97ec 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 */ }