Patchwork [2/2] configure: Fix set-but-not-used warning in Xen 4.1 probe

login
register
mail settings
Submitter Peter Maydell
Date Aug. 2, 2012, 5:30 p.m.
Message ID <1343928627-11311-3-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/174792/
State New
Headers show

Comments

Peter Maydell - Aug. 2, 2012, 5:30 p.m.
The Xen 4.1 probe never uses the return value from xc_interface_open(),
so was provoking a compiler warning on newer gcc. Fix by not bothering
to put the return value anywhere.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/configure b/configure
index c47e440..fe65ab1 100755
--- a/configure
+++ b/configure
@@ -1432,9 +1432,8 @@  EOF
 # error HVM_MAX_VCPUS not defined
 #endif
 int main(void) {
-  xc_interface *xc;
   xs_daemon_open();
-  xc = xc_interface_open(0, 0, 0);
+  xc_interface_open(0, 0, 0);
   xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
   xc_gnttab_open(NULL, 0);
   xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);