diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 3d6f1e752..04800a5f3 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -494,9 +494,14 @@ #endif /* USE_WINDOWS_API */ /* XVASPRINTF is used in ssl.c for wolfSSL_BIO_printf */ + #ifdef __GNUC__ + #define VASPRINTFCHECK __attribute__((format(printf, 2, 0))) + #else + #define VASPRINTFCHECK + #endif /* __GNUC__ */ #if (defined(sun) || defined(__sun) || defined(_AIX)) #include - static WC_INLINE + VASPRINTFCHECK static WC_INLINE int xvasprintf(char **ret, const char *format, va_list args) { int count;