Use attribute __gnu_printf__ with our estream-printf functions.

* common/mischelp.h (JNLIB_GCC_A_PRINTF): Use __gnu_printf__
(JNLIB_GCC_A_NR_PRINTF): Ditto.
--

Our printf supports most of the GNU features and thus we can silence
the warnings from mingw.
This commit is contained in:
Werner Koch 2014-03-07 09:46:44 +01:00
parent 094aa2589e
commit 36372dcb2f
1 changed files with 9 additions and 2 deletions

View File

@ -55,9 +55,16 @@ time_t timegm (struct tm *tm);
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
# define JNLIB_GCC_M_FUNCTION 1
# define JNLIB_GCC_A_NR __attribute__ ((noreturn))
# define JNLIB_GCC_A_PRINTF( f, a ) __attribute__ ((format (printf,f,a)))
# define JNLIB_GCC_A_NR_PRINTF( f, a ) \
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
# define JNLIB_GCC_A_PRINTF( f, a ) \
__attribute__ ((format (__gnu_printf__,f,a)))
# define JNLIB_GCC_A_NR_PRINTF( f, a ) \
__attribute__ ((noreturn, format (__gnu_printf__,f,a)))
# else
# define JNLIB_GCC_A_PRINTF( f, a ) __attribute__ ((format (printf,f,a)))
# define JNLIB_GCC_A_NR_PRINTF( f, a ) \
__attribute__ ((noreturn, format (printf,f,a)))
# endif
#else
# define JNLIB_GCC_A_NR
# define JNLIB_GCC_A_PRINTF( f, a )