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

Re: [XenPPC] [PATCH] fix build break in exceptions.c

To: Amos Waterland <apw@xxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH] fix build break in exceptions.c
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Date: Sat, 9 Sep 2006 07:08:14 +1000
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 08 Sep 2006 14:08:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060908150943.GA13840@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Amos Waterland <apw@xxxxxxxxxx>, xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
References: <20060908150943.GA13840@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Sep 08, 2006 at 11:09:43AM -0400, Amos Waterland wrote:
> Building exceptions.c with CRASH_DEBUG=y produces a build break, because
> gcc complains about the unused variable.

Strange I'm not seeing it here ... infact my program_exception doens't
even have an int recover ... I must be behind ;p
 
> Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>
> 
> ---
> 
>  exceptions.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff -r 715014b95488 xen/arch/powerpc/exceptions.c
> --- a/xen/arch/powerpc/exceptions.c   Thu Sep 07 22:09:06 2006 -0400
> +++ b/xen/arch/powerpc/exceptions.c   Fri Sep 08 11:04:55 2006 -0400
> @@ -55,11 +55,11 @@ void do_dec(struct cpu_user_regs *regs)
>  
>  void program_exception(struct cpu_user_regs *regs, unsigned long cookie)
>  {
> -    int recover = 0;
> -
>  #ifdef CRASH_DEBUG
>      __trap_to_gdb(regs, cookie);
>  #else /* CRASH_DEBUG */
> +    int recover = 0;
> +
>      show_registers(regs);
>      printk("dar 0x%016lx, dsisr 0x%08x\n", mfdar(), mfdsisr());
>      printk("hid4 0x%016lx\n", regs->hid4);


Hmm having a variable declartion after code doesn't seem right.  What about
something like (untested):
---
 void program_exception(struct cpu_user_regs *regs, unsigned long cookie)
 {
-    int recover = 0;
+    int recover;

 #ifdef CRASH_DEBUG
     __trap_to_gdb(regs, cookie);
 #else /* CRASH_DEBUG */
+    recover = 0;
     show_registers(regs);
---

Yours Tony

   linux.conf.au       http://linux.conf.au/ || http://lca2007.linux.org.au/
   Jan 15-20 2007      The Australian Linux Technical Conference!


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

<Prev in Thread] Current Thread [Next in Thread>