From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSX4K-0000K1-DK for qemu-devel@nongnu.org; Thu, 29 Jan 2009 08:36:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSX4H-0000Hs-Gl for qemu-devel@nongnu.org; Thu, 29 Jan 2009 08:36:31 -0500 Received: from [199.232.76.173] (port=48181 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSX4H-0000He-9s for qemu-devel@nongnu.org; Thu, 29 Jan 2009 08:36:29 -0500 Received: from yx-out-1718.google.com ([74.125.44.152]:57956) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LSX4H-0005HT-1V for qemu-devel@nongnu.org; Thu, 29 Jan 2009 08:36:29 -0500 Received: by yx-out-1718.google.com with SMTP id 3so3153627yxi.82 for ; Thu, 29 Jan 2009 05:36:25 -0800 (PST) Message-ID: <4981B0C9.8010403@codemonkey.ws> Date: Thu, 29 Jan 2009 07:36:09 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Mingw GCC not recognising printf format "%I64u" References: <1987955410-BeMail@laptop> In-Reply-To: <1987955410-BeMail@laptop> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. > > >