提交 787b0a22 编写于 作者: E Eric Blake

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.
上级 613f9ea8
...@@ -1206,7 +1206,7 @@ xenapiDomainGetVcpus (virDomainPtr dom, ...@@ -1206,7 +1206,7 @@ xenapiDomainGetVcpus (virDomainPtr dom,
xen_vm_set *vms = NULL; xen_vm_set *vms = NULL;
xen_vm vm = NULL; xen_vm vm = NULL;
xen_string_string_map *vcpu_params = NULL; xen_string_string_map *vcpu_params = NULL;
int nvcpus = 0, cpus = 0, i; int nvcpus = 0, i;
virDomainInfo domInfo; virDomainInfo domInfo;
virNodeInfo nodeInfo; virNodeInfo nodeInfo;
virVcpuInfoPtr ifptr; virVcpuInfoPtr ifptr;
...@@ -1221,9 +1221,7 @@ xenapiDomainGetVcpus (virDomainPtr dom, ...@@ -1221,9 +1221,7 @@ xenapiDomainGetVcpus (virDomainPtr dom,
_("Couldn't fetch Domain Information")); _("Couldn't fetch Domain Information"));
return -1; return -1;
} }
if (xenapiNodeGetInfo(dom->conn, &nodeInfo) == 0) if (xenapiNodeGetInfo(dom->conn, &nodeInfo) != 0) {
cpus = nodeInfo.cpus;
else {
xenapiSessionErrorHandler(dom->conn, VIR_ERR_INTERNAL_ERROR, xenapiSessionErrorHandler(dom->conn, VIR_ERR_INTERNAL_ERROR,
_("Couldn't fetch Node Information")); _("Couldn't fetch Node Information"));
return -1; return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册