1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-30 22:08:02 +02:00

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

View File

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