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

[XenPPC] [xenppc-unstable] [POWERPC] Enable gcc -Wshadow and fix the war

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [POWERPC] Enable gcc -Wshadow and fix the warnings
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Aug 2006 13:40:35 +0000
Delivery-date: Fri, 18 Aug 2006 06:50:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID b10e48a5d1e3b8a14619f52a09851f20769a46cc
# Parent  0af18fd083ed3d09784a7b2b86517557cf91b73d
[POWERPC] Enable gcc -Wshadow and fix the warnings

As sugested by: Amos Waterland <apw@xxxxxxxxxx>
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/arch/powerpc/Makefile    |    1 +
 xen/arch/powerpc/mpic.c      |    6 +++---
 xen/arch/powerpc/ofd_fixup.c |    4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff -r 0af18fd083ed -r b10e48a5d1e3 xen/arch/powerpc/Makefile
--- a/xen/arch/powerpc/Makefile Fri Aug 18 05:00:37 2006 -0400
+++ b/xen/arch/powerpc/Makefile Fri Aug 18 05:17:14 2006 -0400
@@ -47,6 +47,7 @@ obj-y += elf32.o
 # These are extra warnings like for the arch/ppc directory but may not
 # allow the rest of the tree to build.
 PPC_C_WARNINGS += -Wundef -Wmissing-prototypes -Wmissing-declarations
+PPC_C_WARNINGS += -Wshadow
 CFLAGS += $(PPC_C_WARNINGS)
 
 LINK=0x400000
diff -r 0af18fd083ed -r b10e48a5d1e3 xen/arch/powerpc/mpic.c
--- a/xen/arch/powerpc/mpic.c   Fri Aug 18 05:00:37 2006 -0400
+++ b/xen/arch/powerpc/mpic.c   Fri Aug 18 05:17:14 2006 -0400
@@ -498,10 +498,10 @@ static void mpic_enable_irq(unsigned int
 
 #ifdef CONFIG_MPIC_BROKEN_U3
        if (mpic->flags & MPIC_BROKEN_U3) {
-               unsigned int src = irq - mpic->irq_offset;
-               if (mpic_is_ht_interrupt(mpic, src) &&
+               unsigned int bsrc = irq - mpic->irq_offset;
+               if (mpic_is_ht_interrupt(mpic, bsrc) &&
                    (irq_desc[irq].status & IRQ_LEVEL))
-                       mpic_ht_end_irq(mpic, src);
+                       mpic_ht_end_irq(mpic, bsrc);
        }
 #endif /* CONFIG_MPIC_BROKEN_U3 */
 }
diff -r 0af18fd083ed -r b10e48a5d1e3 xen/arch/powerpc/ofd_fixup.c
--- a/xen/arch/powerpc/ofd_fixup.c      Fri Aug 18 05:00:37 2006 -0400
+++ b/xen/arch/powerpc/ofd_fixup.c      Fri Aug 18 05:17:14 2006 -0400
@@ -497,8 +497,8 @@ int ofd_dom0_fixup(struct domain *d, ulo
     r = ofd_prop_add(m, n, "ibm,partition-no", &did, sizeof(did));
     ASSERT( r > 0 );
 
-    const char dom0[] = "dom0";
-    r = ofd_prop_add(m, n, "ibm,partition-name", dom0, sizeof (dom0));
+    const char d0[] = "dom0";
+    r = ofd_prop_add(m, n, "ibm,partition-name", d0, sizeof (d0));
     ASSERT( r > 0 );
 
 

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