From b74bc251c4178e59205b972d76668fafda82d359 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Fri, 23 Apr 2021 13:06:51 +0100 Subject: [PATCH] Fix warnings under MinGW and Clang Use the 'printf' format on all GNU compilers, which includes the MinGW-flavoured GCC and Clang (which is not GNU, but says it is). Signed-off-by: Paul Cercueil --- iio-private.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/iio-private.h b/iio-private.h index e25e507ef..2fe977d91 100644 --- a/iio-private.h +++ b/iio-private.h @@ -37,10 +37,8 @@ #define iio_sscanf sscanf #endif -#if defined(__MINGW32__) -# define __iio_printf __attribute__((__format__(ms_printf, 3, 4))) -#elif defined(__GNUC__) -# define __iio_printf __attribute__((__format__(gnu_printf, 3, 4))) +#if defined(__GNUC__) +# define __iio_printf __attribute__((__format__(printf, 3, 4))) #else # define __iio_printf #endif