diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-06-23 17:16:36 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-24 17:51:04 +0200 |
commit | 454d69271cf65edb1f6d0ca2a06f9b755f6cb937 (patch) | |
tree | 151e550982e0b7f5436558a539f5d6956125080f /include | |
parent | 59a783d05ae379335f70261126d19859ae5a855d (diff) |
trace: Do not produce dead code calling BIO_printf if disabled
Fixes #15880
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15882)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/trace.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/openssl/trace.h b/include/openssl/trace.h index e88ad9d13d..b3a29ea8c4 100644 --- a/include/openssl/trace.h +++ b/include/openssl/trace.h @@ -270,11 +270,19 @@ void OSSL_trace_end(int category, BIO *channel); * 42, "What do you get when you multiply six by nine?"); */ -# define OSSL_TRACEV(category, args) \ +# if !defined OPENSSL_NO_TRACE && !defined FIPS_MODULE + +# define OSSL_TRACEV(category, args) \ OSSL_TRACE_BEGIN(category) \ BIO_printf args; \ OSSL_TRACE_END(category) +# else + +# define OSSL_TRACEV(category, args) ((void)0) + +# endif + # define OSSL_TRACE(category, text) \ OSSL_TRACEV(category, (trc_out, "%s", text)) |