Skip to content

Commit

Permalink
Use gnu_printf format with MinGW
Browse files Browse the repository at this point in the history
We don't actually *need* any of the GNU printf format specifiers.

However, older versions of MinGW will complain about C99-compliant
specifiers like %lld unless 'gnu_printf' is used.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Apr 26, 2021
1 parent 251c17e commit ebf3c7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iio-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
#define iio_sscanf sscanf
#endif

#if defined(__GNUC__)
#if defined(__MINGW32__)
# define __iio_printf __attribute__((__format__(gnu_printf, 3, 4)))
#elif defined(__GNUC__)
# define __iio_printf __attribute__((__format__(printf, 3, 4)))
#else
# define __iio_printf
Expand Down

0 comments on commit ebf3c7e

Please sign in to comment.