Skip to content

Commit

Permalink
util: use gnu_printf format attribute
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
elmarco authored and dgibson committed Oct 14, 2019
1 parent bc87670 commit 588a29f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

#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))
#else
#define PRINTF(i, j)
Expand Down

0 comments on commit 588a29f

Please sign in to comment.