From 787b0a22389815190dd0a437c0ab6f3f995227b1 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 11 Nov 2011 11:10:18 -0700 Subject: [PATCH] xenapi: remove unused variable CC libvirt_driver_xenapi_la-xenapi_driver.lo xenapi/xenapi_driver.c: In function 'xenapiDomainGetVcpus': xenapi/xenapi_driver.c:1209:21: error: variable 'cpus' set but not used [-Werror=unused-but-set-variable] * src/xenapi/xenapi_driver.c (xenapiDomainGetVcpus): Silence compiler warning. --- src/xenapi/xenapi_driver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index d4545891d7..a835b2dae2 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -1206,7 +1206,7 @@ xenapiDomainGetVcpus (virDomainPtr dom, xen_vm_set *vms = NULL; xen_vm vm = NULL; xen_string_string_map *vcpu_params = NULL; - int nvcpus = 0, cpus = 0, i; + int nvcpus = 0, i; virDomainInfo domInfo; virNodeInfo nodeInfo; virVcpuInfoPtr ifptr; @@ -1221,9 +1221,7 @@ xenapiDomainGetVcpus (virDomainPtr dom, _("Couldn't fetch Domain Information")); return -1; } - if (xenapiNodeGetInfo(dom->conn, &nodeInfo) == 0) - cpus = nodeInfo.cpus; - else { + if (xenapiNodeGetInfo(dom->conn, &nodeInfo) != 0) { xenapiSessionErrorHandler(dom->conn, VIR_ERR_INTERNAL_ERROR, _("Couldn't fetch Node Information")); return -1; -- GitLab