[PATCH] Fix build error: unused-result
Chengwei Yang
chengwei.yang at intel.com
Thu May 30 05:54:46 PDT 2013
Signed-off-by: Chengwei Yang <chengwei.yang at intel.com>
---
bus/main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/bus/main.c b/bus/main.c
index ca0be3c..9eb5928 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -59,6 +59,7 @@ typedef enum
static void
signal_handler (int sig)
{
+ int unused;
switch (sig)
{
#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
@@ -91,7 +92,7 @@ signal_handler (int sig)
static const char message[] =
"Unable to write to reload pipe - buffer full?\n";
- write (STDERR_FILENO, message, strlen (message));
+ unused = write (STDERR_FILENO, message, strlen (message));
}
}
break;
@@ -113,8 +114,8 @@ signal_handler (int sig)
"Unable to write termination signal to pipe - buffer full?\n"
"Will exit instead.\n";
- write (STDERR_FILENO, message, strlen (message));
- _exit (1);
+ unused = write (STDERR_FILENO, message, strlen (message));
+ _exit (1 || unused);
}
}
break;
--
1.7.9.5
More information about the dbus
mailing list