From 9bab154d48e367702b65852c3c822341b474ffd2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Aug 2011 16:34:06 +0100 Subject: [PATCH 1/1] Coverity: Ignore return value from guestfs_launch in virt-rescue. We expect guestfs_launch to fail in this program. --- rescue/virt-rescue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 1.8.3.1