summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-05-31 15:02:45 +0800
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-05 17:27:54 +0100
commit634dc5d8a02c4de31c146e845e908f01d803d411 (patch)
tree56eea0f3356d117b85a043aadde114b553f9b278
parentb434238c346a356b7aee4e43a9b88c1df1d4aef5 (diff)
downloaddbus-634dc5d8a02c4de31c146e845e908f01d803d411.tar.gz
Fix build error: unused-result
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--bus/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bus/main.c b/bus/main.c
index ca0be3ce..970c1def 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -91,7 +91,10 @@ signal_handler (int sig)
static const char message[] =
"Unable to write to reload pipe - buffer full?\n";
- write (STDERR_FILENO, message, strlen (message));
+ if (write (STDERR_FILENO, message, strlen (message)) != strlen (message))
+ {
+ /* ignore failure to write out a warning */
+ }
}
}
break;
@@ -113,7 +116,10 @@ signal_handler (int sig)
"Unable to write termination signal to pipe - buffer full?\n"
"Will exit instead.\n";
- write (STDERR_FILENO, message, strlen (message));
+ if (write (STDERR_FILENO, message, strlen (message)) != strlen (message))
+ {
+ /* ignore failure to write out a warning */
+ }
_exit (1);
}
}