Fix !x86 warning that breaks build
PATCH 1/1 Fix !x86 warning that breaks build
compiler warns ctxt and rc are unused and breaks build.
Signed-off-by Jimi Xenidis <[email protected]>
tools/libxc/xc_resume.c +9 -7
@@ -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;