Skip to content

Commit

Permalink
Disable printf format checking on MinGW
Browse files Browse the repository at this point in the history
Fixes #19185

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #19292)

(cherry picked from commit a1de5eb)
  • Loading branch information
faramir-dev authored and hlandau committed Oct 4, 2022
1 parent 9ab1c76 commit 214bb8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/openssl/bio.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ void BIO_copy_next_retry(BIO *b);

# define ossl_bio__attr__(x)
# if defined(__GNUC__) && defined(__STDC_VERSION__) \
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
&& !defined(__APPLE__)
/*
* Because we support the 'z' modifier, which made its appearance in C99,
Expand Down
4 changes: 3 additions & 1 deletion test/testutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ const OPTIONS *test_get_options(void);
*/

# define PRINTF_FORMAT(a, b)
# if defined(__GNUC__) && defined(__STDC_VERSION__)
# if defined(__GNUC__) && defined(__STDC_VERSION__) \
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
&& !defined(__APPLE__)
/*
* Because we support the 'z' modifier, which made its appearance in C99,
* we can't use __attribute__ with pre C99 dialects.
Expand Down
1 change: 1 addition & 0 deletions test/testutil/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# define ossl_test__attr__(x)
# if defined(__GNUC__) && defined(__STDC_VERSION__) \
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
&& !defined(__APPLE__)
/*
* Because we support the 'z' modifier, which made its appearance in C99,
Expand Down

0 comments on commit 214bb8f

Please sign in to comment.