Mailing List Archive

[Xen-devel] Re: Fix Xen to build with gcc-4.1.
On Wed, 2005-11-23 at 15:16 +0000, Xen patchbot -unstable wrote:
> # HG changeset patch
> # User kaf24@firebug.cl.cam.ac.uk
> # Node ID 14d733e5e1d014e302d72fb78df1428ee08e3ce3
> # Parent 6cc603ac3f38f8f4b760899e963ef8165ae0c8ee
> Fix Xen to build with gcc-4.1.
>
> Signed-off-by: Vincent Hanquez <vincent@xensource.com>
>
> diff -r 6cc603ac3f38 -r 14d733e5e1d0 xen/include/asm-x86/apic.h
> --- a/xen/include/asm-x86/apic.h Wed Nov 23 13:14:01 2005
> +++ b/xen/include/asm-x86/apic.h Wed Nov 23 13:15:35 2005
> @@ -43,7 +43,7 @@
>
> static __inline void apic_write_atomic(unsigned long reg, u32 v)
> {
> - xchg((volatile u32 *)(APIC_BASE+reg), v);
> + (void)xchg((volatile u32 *)(APIC_BASE+reg), v);
> }

Is it just me or are the gcc folks taking this stuff a little too far
since gcc 4. Having to cast to void in an inline function just seems a
bit overboard.


>
> static __inline u32 apic_read(unsigned long reg)
>
> _______________________________________________
> Xen-changelog mailing list
> Xen-changelog@lists.xensource.com
> http://lists.xensource.com/xen-changelog
>


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