]> code.delx.au - pulseaudio/commit
gccmacro: Disable printf-like format checking on mingw32 compilers.
authorThomas Martitz <kugel@rockbox.org>
Tue, 23 Oct 2012 10:10:45 +0000 (12:10 +0200)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 23 Oct 2012 10:20:23 +0000 (15:50 +0530)
commitb1303e6d920c3df3d4c89399924ff98c0a633f7f
tree1c538e719b4b53d5518ce69bab9ce967b7f46bb1
parentbb038f76af401ee341b801bff38c30ac2073bbdb
gccmacro: Disable printf-like format checking on mingw32 compilers.

Am 23.10.2012 08:25, schrieb Arun Raghavan:
> On Tue, 2012-08-21 at 13:32 +0200, Thomas Martitz wrote:
>> Am 21.08.2012 08:51, schrieb Rémi Denis-Courmont:
>>> Le mardi 21 août 2012 00:50:34 Thomas Martitz, vous avez écrit :
>>>> There are tons of warnings, most of them because the function is not
>>>> recognized as printf-like.
>>> Removing checks looks very fishy.
>>>
>>> To use C99 and/or GNU format specifiers on MingW, you need to use the
>>> gnuprintf attribute instead of printf. With printf, the format string is
>>> validated according to the antiquated MSVC rules.
>>>
>> Interesting, I didn't know about gnuprintf. FWIW, what are those
>> antiquated MSVC rules? I assumed the return value which isn't int for
>> some affected functions?
> Is this one going to be respun?
>

Yes, here you go.

>From c5f15eec69bf95c9a1261e0d82abbd039156e75e Mon Sep 17 00:00:00 2001
From: Thomas Martitz <kuge@rockbox.org>
Date: Wed, 8 Aug 2012 17:38:04 +0200
Subject: [PATCH 1/3] gccmacro: Work around warnings due to printf redirection
 by libintl.

Libintl defines printf as libintl_printf, which breaks the format
attribue. Unfortunately the workaround around provided by libintl
is only enabled for cygwin, but not for mingw builds. Therefore
install the workaround manually.
src/pulse/gccmacro.h