From: Richard W.M. Jones Date: Tue, 23 Aug 2011 15:34:06 +0000 (+0100) Subject: Coverity: Ignore return value from guestfs_launch in virt-rescue. X-Git-Tag: 1.10.9~21 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=3140f96de94077c703edd7c0e25638f99a303d2d;p=libguestfs.git Coverity: Ignore return value from guestfs_launch in virt-rescue. We expect guestfs_launch to fail in this program. (cherry picked from commit 9bab154d48e367702b65852c3c822341b474ffd2) --- diff --git a/rescue/virt-rescue.c b/rescue/virt-rescue.c index 911b80a..dd033aa 100644 --- a/rescue/virt-rescue.c +++ b/rescue/virt-rescue.c @@ -29,6 +29,7 @@ #include #include +#include "ignore-value.h" #include "progname.h" #include "xvasprintf.h" @@ -289,7 +290,9 @@ main (int argc, char *argv[]) * appliance. */ guestfs_set_error_handler (g, NULL, NULL); - guestfs_launch (g); + + /* We expect launch to fail, so ignore the return value. */ + ignore_value (guestfs_launch (g)); /* launch() expects guestfsd to start. However, virt-rescue doesn't * run guestfsd, so this will always fail with ECHILD when the