[libvirt] [PATCH 5/6] qemu: Resolve Coverity CHECKED_RETURN

John Ferlan jferlan at redhat.com
Wed Sep 23 23:18:32 UTC 2015


Coverity complains that return from virHookCall is not checked in
one place in qemuProcessStop.  Since the comment notes that we cannot
stop the operation even it if fails, just added the ignore_value.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/qemu/qemu_process.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index b961f40..eb04883 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5276,9 +5276,9 @@ void qemuProcessStop(virQEMUDriverPtr driver,
         char *xml = qemuDomainDefFormatXML(driver, vm->def, 0);
 
         /* we can't stop the operation even if the script raised an error */
-        virHookCall(VIR_HOOK_DRIVER_QEMU, vm->def->name,
-                    VIR_HOOK_QEMU_OP_STOPPED, VIR_HOOK_SUBOP_END,
-                    NULL, xml, NULL);
+        ignore_value(virHookCall(VIR_HOOK_DRIVER_QEMU, vm->def->name,
+                                 VIR_HOOK_QEMU_OP_STOPPED, VIR_HOOK_SUBOP_END,
+                                 NULL, xml, NULL));
         VIR_FREE(xml);
     }
 
-- 
2.1.0




More information about the libvir-list mailing list