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

Re: [XenPPC] [xenppc-unstable] [POWERPC] Enable gcc -Wshadow and fix the warnings



> wow, thats a little unexpected, what version of gcc is that?
> anyway, does the following patch solve the issue?
> -JX

> diff -r dbe9249ba61b xen/include/asm-powerpc/current.h
> --- a/xen/include/asm-powerpc/current.h       Sun Aug 20 13:28:45 2006 -0400
> +++ b/xen/include/asm-powerpc/current.h       Sun Aug 20 21:11:22 2006 -0400
> @@ -66,7 +66,7 @@ static inline struct cpu_user_regs *gues
> static inline void reset_stack_and_jump(void (*f)(void))
> {
> -    void _reset_stack_and_jump(void (*f)(void), struct cpu_user_regs  
> *regs);
> +    void _reset_stack_and_jump(void (*)(void), struct cpu_user_regs *);
>       struct cpu_user_regs *regs = guest_cpu_user_regs();
> #ifdef TRACK_RESUME


Yes, this patch solved the problem.
Yet another shadow problem (this seems to be the last one):

powerpc64-unknown-linux-gnu-gcc -m64 -ffreestanding -fno-builtin -fno-common 
-fno-strict-aliasing -iwithprefix include -Wall -Werror -pipe 
-I/home/poff/xenppc-unstable-work7.hg/xen/include 
-I/home/poff/xenppc-unstable-work7.hg/xen/include/asm-powerpc/mach-generic 
-I/home/poff/xenppc-unstable-work7.hg/xen/include/asm-powerpc/mach-default 
-Wpointer-arith -Wredundant-decls -Wpacked -msoft-float -O2 -O0 -g -D__XEN__ 
-DVERBOSE -DCRASH_DEBUG -Wundef -Wmissing-prototypes -Wmissing-declarations 
-Wshadow -c dart.c -o dart.o
In file included from dart.c:29:
oftree.h:28: warning: declaration of 'oftree' shadows a global declaration
oftree.h:24: warning: shadowed declaration is here
make[3]: *** [dart.o] Error 1


gcc version:

powerpc64-unknown-linux-gnu-gcc -v
Reading specs from 
/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/lib/gcc/powerpc64-unknown-linux-gnu/3.4.1/specs
Configured with: 
/home/poff/crosstool-0.28-rc35/build/powerpc64-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/gcc-3.4.1/configure
 --target=powerpc64-unknown-linux-gnu --host=i686-host_pc-linux-gnu 
--prefix=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3 
--disable-multilib 
--with-sysroot=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/powerpc64-unknown-linux-gnu/sys-root
 
--with-local-prefix=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/powerpc64-unknown-linux-gnu/sys-root
 --disable-nls --enable-threads=posix --enable-symvers=gnu 
--enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 
--enable-long-long
Thread model: posix
gcc version 3.4.1

-- 

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


 


Rackspace

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