WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][LIBXC] Fix !x86 warning that breaks build
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Sun, 21 Jan 2007 09:18:49 -0500
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 21 Jan 2007 06:22:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][LIBXC] Fix !x86 warning that breaks build, Jimi Xenidis <=