diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-03-04 11:52:51 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-03-04 18:41:15 +0000 |
commit | 0d42526efa4b0249e169f844c894fb13b1fc6fd3 (patch) | |
tree | 0b60ff0a9a157f066061da3a04cab1fffef12221 /bus/main.c | |
parent | 08a75e07cbf66d6f22ab0ddc64244fbcfd061278 (diff) | |
download | dbus-0d42526efa4b0249e169f844c894fb13b1fc6fd3.tar.gz |
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 <ralf.habacker@freenet.de>
Diffstat (limited to 'bus/main.c')
-rw-r--r-- | bus/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 */ } |