From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Mingw GCC not recognising printf format "%I64u"
Date: Thu, 29 Jan 2009 07:36:09 -0600 [thread overview]
Message-ID: <4981B0C9.8010403@codemonkey.ws> (raw)
In-Reply-To: <1987955410-BeMail@laptop>
François Revol wrote:
>> Jamie Lokier wrote:
>>
>>> Anthony Liguori wrote:
>>>
>>>> Consul wrote:
>>>>
>>>>> This patch suppresses a lot of mingw warnings like
>>>>> qemu-img.c:288: warning: format '%I64u' expects type 'unsigned
>>>>> int',
>>>>> but argument 2 has type 'uint64_t'
>>>>>
>>>> I'd rather see the warning fixed (by switching to PRIu64) than to
>>>> have
>>>> the warnings disabled.
>>>>
>>> Since that's in code for Windows, I'd rather see mingw's GCC fixed
>>> to recognise %I64u, since that's fine Windows code.
>>>
>
> I suppose Windows doesn't #define the now standard PRI*N macros:
> http://www.opengroup.org/onlinepubs/009695399/basedefs/inttypes.h.html
>
> else you'd use PRIu64.
>
Or we can just do
#ifdef _WIN32
#define PRIu64 "%llu"
#endif
or whatever the correct format is.
Regards,
Anthony Liguori
> I won't blame it for not doing so, BeOS didn't have them either (but
> hey, it was out before C99...).
>
> François.
>
>
>
next prev parent reply other threads:[~2009-01-29 13:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 19:43 [Qemu-devel] [PATCH] Silence half of warnings in MinGW Consul
2009-01-28 21:50 ` Anthony Liguori
2009-01-29 6:21 ` [Qemu-devel] Mingw GCC not recognising printf format "%I64u" Jamie Lokier
2009-01-29 6:28 ` Jamie Lokier
2009-01-29 7:42 ` François Revol
2009-01-29 13:36 ` Anthony Liguori [this message]
2009-01-29 13:55 ` Jamie Lokier
2009-01-29 15:00 ` Anthony Liguori
2009-01-29 18:34 ` [Qemu-devel] " Consul
2009-01-29 18:42 ` [Qemu-devel] " Jamie Lokier
2009-01-29 19:50 ` Anthony Liguori
2009-01-29 20:44 ` [Qemu-devel] " Consul
2009-01-29 20:56 ` Anthony Liguori
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=4981B0C9.8010403@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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).