qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fix gcc4 compile warnings


From: Samuel Thibault
Subject: Re: [Qemu-devel] [PATCH] fix gcc4 compile warnings
Date: Fri, 30 Nov 2007 14:24:02 +0000
User-agent: Mutt/1.5.12-2006-07-14

Andre Przywara, le Fri 30 Nov 2007 15:10:07 +0100, a écrit :
> A more portable and clean solution would be this:
> -    void *args[MAX_ARGS];
> +    union
> +    {
> +        void* ptr;
> +        int i;
> +    } args[MAX_ARGS];

It's not more portable: C99 doesn't asserts that if you write ptr and
read i you will get the result of a cast (only gcc does). void * should
be fine.

Samuel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]