From ac64aab40ec09f4dd6c3cc629bcf8f213b55d014 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 5 Apr 2016 22:22:47 +0200 Subject: [PATCH] s3:vfs:preopen: fix O3 error unused result of write (void) cast is not enough. Signed-off-by: Michael Adam Reviewed-by: Christian Ambach --- source3/modules/vfs_preopen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_preopen.c b/source3/modules/vfs_preopen.c index b67aad86b55..8bf30b6745e 100644 --- a/source3/modules/vfs_preopen.c +++ b/source3/modules/vfs_preopen.c @@ -21,6 +21,7 @@ #include "includes.h" #include "system/filesys.h" #include "smbd/smbd.h" +#include "lib/util/sys_rw.h" #include "lib/util/sys_rw_data.h" struct preopen_state; @@ -185,7 +186,7 @@ static bool preopen_helper_open_one(int sock_fd, char **pnamebuf, close(fd); done: - (void)write(sock_fd, &c, 1); + sys_write_v(sock_fd, &c, 1); return true; }