[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 2/2] libvirt: avoid dead store in virDomainMigrateVersion3



* src/qemu/qemu_migration.c: avoid dead 'ret' assignment and silence 
  clang warning.

Detected by ccc-analyzer:

libvirt.c:4277:5: warning: Value stored to 'ret' is never read
    ret = domain->conn->driver->domainMigrateConfirm3
    ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 src/libvirt.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index c8af3e1..023e9a7 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -4281,6 +4281,9 @@ confirm:
      * do, but fortunately worst case is that there is a
      * domain left in 'paused' state on source.
      */
+    if (ret < 0)
+        VIR_WARN("Guest %s probably left in 'paused' state on source",
+                 domain->name);
 
  done:
     if (orig_err) {
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]