qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Mingw GCC not recognising printf format "%I64u"


From: Anthony Liguori
Subject: Re: [Qemu-devel] Mingw GCC not recognising printf format "%I64u"
Date: Thu, 29 Jan 2009 07:36:09 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

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.







reply via email to

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