fix some "unused result" warnings in dbus-launch and dbus-spawn dbus-1.4.0
authorHavoc Pennington <hp@pobox.com>
Tue, 31 Aug 2010 16:00:26 +0000 (12:00 -0400)
committerLennart Poettering <lennart@poettering.net>
Mon, 6 Sep 2010 17:30:42 +0000 (19:30 +0200)
Needed to avoid -Werror

dbus/dbus-spawn.c
tools/dbus-launch.c

index c3be1b7..dcd111d 100644 (file)
@@ -1079,7 +1079,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);
         }
index ec4c9a5..6fa9c92 100644 (file)
@@ -365,9 +365,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)