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

[Xen-devel] [PATCH][LIBXC] Fix !x86 warning that breaks build



compiler warns ctxt and rc are unused and breaks build.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>

diff -r bd937e22541d tools/libxc/xc_resume.c
--- a/tools/libxc/xc_resume.c   Sun Jan 21 09:12:57 2007 -0500
+++ b/tools/libxc/xc_resume.c   Sun Jan 21 09:14:46 2007 -0500
@@ -13,20 +13,22 @@
  */
 int xc_domain_resume(int xc_handle, uint32_t domid)
 {
-    vcpu_guest_context_t ctxt;
     DECLARE_DOMCTL;
-    int rc;
 
     /*
      * Set hypercall return code to indicate that suspend is cancelled
      * (rather than resuming in a new domain context).
      */
 #if defined(__i386__) || defined(__x86_64__)
-    if ( (rc = xc_vcpu_getcontext(xc_handle, domid, 0, &ctxt)) != 0 )
-        return rc;
-    ctxt.user_regs.eax = 1;
-    if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt)) != 0 )
-        return rc;
+    {
+        vcpu_guest_context_t ctxt;
+        int rc;
+        if ( (rc = xc_vcpu_getcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+            return rc;
+        ctxt.user_regs.eax = 1;
+        if ( (rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt)) != 0 )
+            return rc;
+    }
 #endif
 
     domctl.cmd = XEN_DOMCTL_resumedomain;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.