Re: [hatari-devel] Warnings with Windows build

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Thorsten Otto schrieb:

Depends on what you count as "supported windows version". In Windows 7, that
does *not* work

Windows 7 is out of support.

Workaround typically is to define
__USE_MINGW_ANSI_STDIO so the printf function (and also the attribute(printf))
is redirected to gnu_printf

MingW already does that for you when compiling C99 source code, such as
Hatari:
https://github.com/mirror/mingw-w64/blob/6eb571448c696782f06f36de394950fca4402c68/mingw-w64-headers/crt/_mingw.h.in#L425-L437

This is precisely the reason why PRId64 expands to "lld" in the first
place in the warning I quoted in my initial post. If you read the link
that I posted [1], you will see that defining __USE_MINGW_ANSI_STDIO
does *NOT* silence the warning as it does *NOT* redefine
__attribute__((__format__ (printf [...] in Hatari's code.

Feel free to test yourself if you don't believe that I have tested it!

Regards
Christian

[1]
https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/#user-printf-and-scanf
--
Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
WWW: https://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/