From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] fix gcc4 compile warnings
Date: Fri, 30 Nov 2007 14:24:02 +0000 [thread overview]
Message-ID: <20071130142402.GD4211@implementation.uk.xensource.com> (raw)
In-Reply-To: <475019BF.4040906@amd.com>
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
next prev parent reply other threads:[~2007-11-30 14:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 23:58 [Qemu-devel] [PATCH] fix gcc4 compile warnings André Przywara
2007-11-30 13:23 ` andrzej zaborowski
2007-11-30 14:10 ` Andre Przywara
2007-11-30 14:24 ` Samuel Thibault [this message]
2007-11-30 14:30 ` andrzej zaborowski
2007-11-30 14:38 ` Samuel Thibault
2007-11-30 14:48 ` Paul Brook
2007-11-30 14:56 ` Andre Przywara
2007-11-30 14:06 ` Paul Brook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071130142402.GD4211@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).