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 <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Kirill A. Shutemov 2009-12-25 18:19:18 +00:00 committed by Blue Swirl
parent 5a41ecc5f2
commit f0d98b0517

View File

@ -200,14 +200,8 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
execvp(argv[0], (char **)argv); execvp(argv[0], (char **)argv);
/* Ooops, failed, let's tell the user why */ /* Ooops, failed, let's tell the user why */
{ fprintf(stderr, "Error: execvp of %s failed: %s\n",
char buff[256]; argv[0], strerror(errno));
snprintf(buff, sizeof(buff),
"Error: execvp of %s failed: %s\n",
argv[0], strerror(errno));
write(2, buff, strlen(buff)+1);
}
close(0); close(1); close(2); /* XXX */ close(0); close(1); close(2); /* XXX */
exit(1); exit(1);