summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-08 10:48:21 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-08 13:21:51 +0000
commit07a8c3c0c25974e0b9496966a7a1354be9ee844f (patch)
tree1a3c3fad859b68975475782ed8d0cafd921b655a
parent10f240a07f156493eb0540a95f9a3deba36c6862 (diff)
downloadlibguestfs-07a8c3c0c25974e0b9496966a7a1354be9ee844f.tar.gz
libguestfs-07a8c3c0c25974e0b9496966a7a1354be9ee844f.tar.xz
libguestfs-07a8c3c0c25974e0b9496966a7a1354be9ee844f.zip
Ignore return values from some functions in guestfs_close (Coverity warning).
Error: CHECKED_RETURN: /builddir/build/BUILD/libguestfs-1.16.5/java/com_redhat_et_libguestfs_GuestFS.c:9552: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)". /builddir/build/BUILD/libguestfs-1.16.5/java/com_redhat_et_libguestfs_GuestFS.c:9555: example_checked: "r" has its value checked in "r == -1". /builddir/build/BUILD/libguestfs-1.16.5/ocaml/guestfs_c_actions.c:5584: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)". /builddir/build/BUILD/libguestfs-1.16.5/ocaml/guestfs_c_actions.c:5586: example_checked: "r" has its value checked in "r == -1". /builddir/build/BUILD/libguestfs-1.16.5/perl/Guestfs.xs:5990: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)". /builddir/build/BUILD/libguestfs-1.16.5/perl/Guestfs.xs:5991: example_checked: "r" has its value checked in "r == -1". /builddir/build/BUILD/libguestfs-1.16.5/python/guestfs-py.c:13702: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)". /builddir/build/BUILD/libguestfs-1.16.5/python/guestfs-py.c:13707: example_checked: "r" has its value checked in "r == -1". /builddir/build/BUILD/libguestfs-1.16.5/ruby/ext/guestfs/_guestfs.c:16000: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)". /builddir/build/BUILD/libguestfs-1.16.5/ruby/ext/guestfs/_guestfs.c:16001: example_checked: "r" has its value checked in "r == -1". /builddir/build/BUILD/libguestfs-1.16.5/src/guestfs.c:191: check_return: Calling function "guestfs_internal_autosync" without checking return value (as is done elsewhere 5 out of 6 times). /builddir/build/BUILD/libguestfs-1.16.5/src/guestfs.c:191: unchecked_value: No check of the return value of "guestfs_internal_autosync(g)".
-rw-r--r--src/guestfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/guestfs.c b/src/guestfs.c
index 3493d793..187e22ec 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -65,6 +65,7 @@
#include "glthread/lock.h"
#include "hash.h"
#include "hash-pjw.h"
+#include "ignore-value.h"
#include "guestfs.h"
#include "guestfs-internal.h"
@@ -188,7 +189,7 @@ guestfs_close (guestfs_h *g)
/* Try to sync if autosync flag is set. */
if (g->autosync && g->state == READY)
- guestfs_internal_autosync (g);
+ ignore_value (guestfs_internal_autosync (g));
/* If we are valgrinding the daemon, then we *don't* want to kill
* the subprocess because we want the final valgrind messages sent
@@ -199,7 +200,7 @@ guestfs_close (guestfs_h *g)
#ifndef VALGRIND_DAEMON
/* Kill the qemu subprocess. */
if (g->state != CONFIG)
- guestfs_kill_subprocess (g);
+ ignore_value (guestfs_kill_subprocess (g));
#endif
/* Run user close callbacks. */