util: use gnu_printf format attribute

dtc uses non-portable formats. Using gnu_printf attributes (for
warnings) in combination with __USE_MINGW_ANSI_STDIO allows to build
for win32.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191009102025.10179-8-marcandre.lureau@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Marc-André Lureau 2019-10-09 14:20:22 +04:00 committed by David Gibson
parent bc876708ab
commit 588a29ff2e
1 changed files with 1 additions and 1 deletions

2
util.h
View File

@ -12,7 +12,7 @@
*/ */


#ifdef __GNUC__ #ifdef __GNUC__
#define PRINTF(i, j) __attribute__((format (printf, i, j))) #define PRINTF(i, j) __attribute__((format (gnu_printf, i, j)))
#define NORETURN __attribute__((noreturn)) #define NORETURN __attribute__((noreturn))
#else #else
#define PRINTF(i, j) #define PRINTF(i, j)