From b9c52bb9f0a3b0d7cd38cb304c862f47085d3554 Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Fri, 25 Dec 2009 18:19:18 +0000 Subject: slirp/misc.c: fix warning with _FORTIFY_SOURCE CC slirp/misc.o cc1: warnings being treated as errors slirp/misc.c: In function 'fork_exec': slirp/misc.c:209: error: ignoring return value of 'write', declared with attribute warn_unused_result make: *** [slirp/misc.o] Error 1 Signed-off-by: Kirill A. Shutemov Signed-off-by: Blue Swirl --- misc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/misc.c b/misc.c index 48abe9d..c1a8989 100644 --- a/misc.c +++ b/misc.c @@ -193,13 +193,8 @@ int fork_exec(struct socket *so, const char *ex, int do_pty) execvp(argv[0], (char **)argv); /* Ooops, failed, let's tell the user why */ - { - char buff[256]; - - snprintf(buff, sizeof(buff), "Error: execvp of %s failed: %s\n", - argv[0], strerror(errno)); - write(2, buff, strlen(buff) + 1); - } + fprintf(stderr, "Error: execvp of %s failed: %s\n", argv[0], + strerror(errno)); close(0); close(1); close(2); /* XXX */ -- cgit v1.1