Turn off printf format checking for BIO_printf et al on Mac OS/X
authorRichard Levitte <levitte@openssl.org>
Fri, 9 Feb 2018 12:45:58 +0000 (13:45 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 9 Feb 2018 13:06:41 +0000 (14:06 +0100)
Mac OS/X has a type for %j that doesn't agree with how we define it,
which gives incorrect warnings.  The easiest way out of that situation
is simply to turn off that check on Mac OS/X.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5302)

include/openssl/bio.h

index 54a833c..d8d8ac4 100644 (file)
@@ -735,7 +735,8 @@ void BIO_copy_next_retry(BIO *b);
  */
 
 # define __bio_h__attr__(x)
-# if defined(__GNUC__) && defined(__STDC_VERSION__)
+# if defined(__GNUC__) && defined(__STDC_VERSION__) \
+    && !defined(__APPLE__)
     /*
      * Because we support the 'z' modifier, which made its appearance in C99,
      * we can't use __attribute__ with pre C99 dialects.