compile warnings in __IRQ_STAT
/home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h: In function `cpu_raise_softirq': /home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h:28:
warning: use of compound expressions as lvalues is deprecated
static inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr)
{
if ( !test_and_set_bit(nr, &softirq_pending(cpu)) )
smp_send_event_check_cpu(cpu);
}#define softirq_pending(cpu) __IRQ_STAT((cpu), __softirq_pending)
I have CONFIG_SMP disabled, so the definition being used is this:
#define __IRQ_STAT(cpu, member) ((void)(cpu), irq_stat[0].member)
So the warning is caused by this statement:
&((void)(cpu), irq_stat[0].member))
GCC version:
basalt xeno-unstable-ppc% powerpc64-unknown-linux-gnu-gcc -v
Reading specs
from /opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/lib/gcc/powerpc64-unknown-linux-gnu/3.4.2/specs Configured
with: /home/hollis/source/crosstool-0.28-rc37/build/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/gcc-3.4.2/configure --target=powerpc64-unknown-linux-gnu --host=i686-host_pc-linux-gnu --prefix=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3
--disable-multilib --with-sysroot=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/powerpc64-unknown-linux-gnu/sys-root --with-local-prefix=/opt/crosstool/powerpc64-unknown-linux-gnu/gcc-3.4.2-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.2
Undefining CONFIG_SMP and building with GCC 3.4 on x86 should cause the same problem. Suggestions on how to fix? Removing the (void)cpu fixes it for me...
Signature · 9 lines
Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 2 lines · Hollis Blanchard
/home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h: In function `cpu_raise_softirq':/home/hollis/source/xeno-unstable-ppc/xen/include/xen/softirq.h:28: warning: use of compound expressions as lvalues is deprecated
[...]
Quoted 6 lines
#define
__IRQ_STAT(cpu, member)((void)(cpu), irq_stat[0].member)So the warning is caused by this statement:
&((void)(cpu), irq_stat[0].member))[...] Suggestions on how to fix?
#define __IRQ_STAT(cpu, member) (irq_stat[((void)(cpu), 0)].member)
Signature · 9 lines
David Hopwood <[email protected]> ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click