From f96ab00e44550ab431742bef766219c0b65cd13b Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 31 Aug 2010 12:00:26 -0400 Subject: [PATCH 2/2] fix some "unused result" warnings in dbus-launch and dbus-spawn Needed to avoid -Werror --- dbus/dbus-spawn.c | 3 ++- tools/dbus-launch.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index 9105415..53b9123 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -1052,7 +1052,8 @@ babysit (pid_t grandchild_pid, else if (pfds[1].revents & _DBUS_POLLIN) { char b; - read (sigchld_pipe[READ_END], &b, 1); + if (read (sigchld_pipe[READ_END], &b, 1) == -1) + /* ignore */; /* do waitpid check */ check_babysit_events (grandchild_pid, parent_pipe, 0); } diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c index d3553e8..ab70b0b 100644 --- a/tools/dbus-launch.c +++ b/tools/dbus-launch.c @@ -363,9 +363,9 @@ print_variables (const char *bus_address, pid_t bus_pid, long bus_wid, { if (binary_syntax) { - write (1, bus_address, strlen (bus_address) + 1); - write (1, &bus_pid, sizeof bus_pid); - write (1, &bus_wid, sizeof bus_wid); + do_write (1, bus_address, strlen (bus_address) + 1); + do_write (1, &bus_pid, sizeof bus_pid); + do_write (1, &bus_wid, sizeof bus_wid); return; } else if (c_shell_syntax) -- 1.7.0.4