[prev in list] [next in list] [prev in thread] [next in thread] 

List:       user-mode-linux-devel
Subject:    [uml-devel] [PATCH 02/10] uml: helper.c warning corrections
From:       Richard Weinberger <richard () nod ! at>
Date:       2011-07-21 9:18:26
Message-ID: 1311239914-8301-2-git-send-email-richard () nod ! at
[Download RAW message or body]

From: Vitaliy Ivanov <vitalivanov@gmail.com>

arch/um/os-Linux/helper.c: In function ‘helper_child':
arch/um/os-Linux/helper.c:38:7: warning: ignoring return value of ‘write', declared \
with attribute warn_unused_result

Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
[richard@nod.at: happens only with -D_FORTIFY_SOURCE=2]
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/um/os-Linux/helper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index b6b1096..feff22d 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -28,14 +28,14 @@ static int helper_child(void *arg)
 {
 	struct helper_data *data = arg;
 	char **argv = data->argv;
-	int err;
+	int err, ret;
 
 	if (data->pre_exec != NULL)
 		(*data->pre_exec)(data->pre_data);
 	err = execvp_noalloc(data->buf, argv[0], argv);
 
 	/* If the exec succeeds, we don't get here */
-	write(data->fd, &err, sizeof(err));
+	CATCH_EINTR(ret = write(data->fd, &err, sizeof(err)));
 
 	return 0;
 }
-- 
1.7.6


------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic