aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2018-04-02 17:20:04 +0200
committerBernd Edlinger <bernd.edlinger@hotmail.de>2018-04-03 16:00:01 +0200
commit4f090f76a412a0f69f85621468bd445ea6a65af6 (patch)
tree1b429abc1f3fe4e5fc5e5e67119382305bbc20e8 /include
parentf4b076e6e683d36ebeb496f15c06020e0b9bdccd (diff)
downloadopenssl-4f090f76a412a0f69f85621468bd445ea6a65af6.zip
openssl-4f090f76a412a0f69f85621468bd445ea6a65af6.tar.gz
openssl-4f090f76a412a0f69f85621468bd445ea6a65af6.tar.bz2
Use gnu_printf format attribute to minimise MinGW warnings
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5839)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/bio.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/openssl/bio.h b/include/openssl/bio.h
index 364ff16..2888b42 100644
--- a/include/openssl/bio.h
+++ b/include/openssl/bio.h
@@ -735,7 +735,7 @@ void BIO_copy_next_retry(BIO *b);
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
*/
-# define __bio_h__attr__(x)
+# define ossl_bio__attr__(x)
# if defined(__GNUC__) && defined(__STDC_VERSION__) \
&& !defined(__APPLE__)
/*
@@ -743,19 +743,25 @@ void BIO_copy_next_retry(BIO *b);
* we can't use __attribute__ with pre C99 dialects.
*/
# if __STDC_VERSION__ >= 199901L
-# undef __bio_h__attr__
-# define __bio_h__attr__ __attribute__
+# undef ossl_bio__attr__
+# define ossl_bio__attr__ __attribute__
+# if __GNUC__*10 + __GNUC_MINOR__ >= 44
+# define ossl_bio__printf__ __gnu_printf__
+# else
+# define ossl_bio__printf__ __printf__
+# endif
# endif
# endif
int BIO_printf(BIO *bio, const char *format, ...)
-__bio_h__attr__((__format__(__printf__, 2, 3)));
+ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3)));
int BIO_vprintf(BIO *bio, const char *format, va_list args)
-__bio_h__attr__((__format__(__printf__, 2, 0)));
+ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0)));
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
-__bio_h__attr__((__format__(__printf__, 3, 4)));
+ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4)));
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
-__bio_h__attr__((__format__(__printf__, 3, 0)));
-# undef __bio_h__attr__
+ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0)));
+# undef ossl_bio__attr__
+# undef ossl_bio__printf__
BIO_METHOD *BIO_meth_new(int type, const char *name);