From 681436ada8702476be11e375d05a9eca85e0af0d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 15 Aug 2013 14:35:28 -0700 Subject: [PATCH] common/Preforker: shut up warning common/Preforker.h: In member function 'void Preforker::daemonize()': common/Preforker.h:97:40: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Sage Weil --- src/common/Preforker.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/Preforker.h b/src/common/Preforker.h index 98304c632b719..00a4d6a8875ea 100644 --- a/src/common/Preforker.h +++ b/src/common/Preforker.h @@ -94,7 +94,8 @@ public: void daemonize() { assert(forked); static int r = -1; - (void)::write(fd[1], &r, sizeof(r)); + int r2 = ::write(fd[1], &r, sizeof(r)); + r += r2; // make the compiler shut up about the unused return code from ::write(2). } }; -- 2.39.5