]> Git Repo - qemu.git/commitdiff
slirp/misc.c: fix warning with _FORTIFY_SOURCE
authorKirill A. Shutemov <[email protected]>
Fri, 25 Dec 2009 18:19:18 +0000 (18:19 +0000)
committerBlue Swirl <[email protected]>
Fri, 25 Dec 2009 18:19:18 +0000 (18:19 +0000)
  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 <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
slirp/misc.c

index c76ad8fefdf183c1927a3f598678da3baffee3ca..05f4fb329f3e889727f338a82caceabcc973f7c9 100644 (file)
@@ -200,14 +200,8 @@ 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 */
                exit(1);
 
This page took 0.026929 seconds and 4 git commands to generate.