[PATCH 1/2] build: remove some dead assignments

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

 



No syntactic effect; this merely silences some clang warnings.

* src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Drop
redundant ret=0 statement.
* src/qemu/qemu_monitor_text.c (qemuMonitorTextDriveDel):
Likewise.
---

More clang fallout, found by switching over to rawhide.

 src/libxl/libxl_driver.c     |    1 -
 src/qemu/qemu_monitor_text.c |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index dec4f43..5355b57 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1659,7 +1659,6 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
         def->maxvcpus = nvcpus;
         if (nvcpus < def->vcpus)
             def->vcpus = nvcpus;
-        ret = 0;
         break;

     case VIR_DOMAIN_VCPU_CONFIG:
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 53781c8..7ace95f 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -2396,7 +2396,6 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
     } else if (STRPREFIX(reply, "Device '") && (strstr(reply, "not found"))) {
         /* NB: device not found errors mean the drive was auto-deleted and we
          * ignore the error */
-        ret = 0;
     } else if (STRNEQ(reply, "")) {
         qemuReportError(VIR_ERR_OPERATION_FAILED,
                         _("deleting %s drive failed: %s"), drivestr, reply);
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]