summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-09 01:42:24 +0200
committerSage Weil <sage@inktank.com>2013-05-09 01:42:24 +0200
commita284c9ece85f11d020d492120be66a9f4c997416 (patch)
tree6a7ee88ebc974a4de9e6aaefb3f6c5a723eb8068
parentdebian/control: squeeze requres cryptsetup package (diff)
downloadceph-a284c9ece85f11d020d492120be66a9f4c997416.tar.xz
ceph-a284c9ece85f11d020d492120be66a9f4c997416.zip
common/Preforker: fix warnings
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/common/Preforker.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/Preforker.h b/src/common/Preforker.h
index 07f21b45e46..bda5771d37b 100644
--- a/src/common/Preforker.h
+++ b/src/common/Preforker.h
@@ -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));
}
};