]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Preforker: fix warnings
authorSage Weil <sage@inktank.com>
Wed, 8 May 2013 23:42:24 +0000 (16:42 -0700)
committerSage Weil <sage@inktank.com>
Wed, 8 May 2013 23:42:24 +0000 (16:42 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/common/Preforker.h

index 07f21b45e46011d2c1904ae03013057bf18f01dd..bda5771d37b5eab1c993d94ad374854df3e92875 100644 (file)
@@ -6,6 +6,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
+#include <errno.h>
 #include <unistd.h>
 #include "common/safe_io.h"
 
@@ -78,7 +79,7 @@ public:
   void exit(int r) {
     if (forked) {
       // tell parent
-      ::write(fd[1], &r, sizeof(r));
+      (void)::write(fd[1], &r, sizeof(r));
     }
     ::exit(r);
   }
@@ -86,7 +87,7 @@ public:
   void daemonize() {
     assert(forked);
     static int r = -1;
-    ::write(fd[1], &r, sizeof(r));
+    (void)::write(fd[1], &r, sizeof(r));
   }
   
 };