diff options
author | Werner Koch <[email protected]> | 2018-11-16 15:25:49 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-11-16 15:25:49 +0000 |
commit | 5857491a2aa7d4975100d90f1ad62c08aa345e3e (patch) | |
tree | c433d2da27e7b9f98ca783e15b00087f2ce3d6cd /src/encrypt-sign.c | |
parent | Add SPDX identifiers to most source files (diff) | |
download | gpgme-5857491a2aa7d4975100d90f1ad62c08aa345e3e.tar.gz gpgme-5857491a2aa7d4975100d90f1ad62c08aa345e3e.zip |
core: Simplify the trace maros by using variadics.
* src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros
and remove the TRACE_BEG1 et al. Change all users to always pass a
format string.
(TRACE): Ditto.
* src/debug.c (_gpgme_debugf): New.
* configure.ac <GCC>: Add -Wno-format-zero-length.
--
This makes it easier for use to enable format checks. The zero-length
format is required to allow for an empty format due to the comman
problematic of __VA_ARGS__.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/encrypt-sign.c')
-rw-r--r-- | src/encrypt-sign.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/encrypt-sign.c b/src/encrypt-sign.c index acc1a05d..e8272d8e 100644 --- a/src/encrypt-sign.c +++ b/src/encrypt-sign.c @@ -143,7 +143,7 @@ gpgme_op_encrypt_sign_ext (gpgme_ctx_t ctx, gpgme_key_t recp[], { gpgme_error_t err; - TRACE_BEG3 (DEBUG_CTX, "gpgme_op_encrypt_sign", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_encrypt_sign", ctx, "flags=0x%x, plain=%p, cipher=%p", flags, plain, cipher); if (!ctx) @@ -157,7 +157,7 @@ gpgme_op_encrypt_sign_ext (gpgme_ctx_t ctx, gpgme_key_t recp[], while (recp[i]) { - TRACE_LOG3 ("recipient[%i] = %p (%s)", i, recp[i], + TRACE_LOG ("recipient[%i] = %p (%s)", i, recp[i], (recp[i]->subkeys && recp[i]->subkeys->fpr) ? recp[i]->subkeys->fpr : "invalid"); i++; @@ -165,7 +165,7 @@ gpgme_op_encrypt_sign_ext (gpgme_ctx_t ctx, gpgme_key_t recp[], } else { - TRACE_LOG1 ("recipients = '%s'", recpstring); + TRACE_LOG ("recipients = '%s'", recpstring); } } @@ -187,7 +187,7 @@ gpgme_op_encrypt_sign_ext_start (gpgme_ctx_t ctx, gpgme_key_t recp[], { gpgme_error_t err; - TRACE_BEG3 (DEBUG_CTX, "gpgme_op_encrypt_sign_start", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_encrypt_sign_start", ctx, "flags=0x%x, plain=%p, cipher=%p", flags, plain, cipher); if (!ctx) @@ -201,7 +201,7 @@ gpgme_op_encrypt_sign_ext_start (gpgme_ctx_t ctx, gpgme_key_t recp[], while (recp[i]) { - TRACE_LOG3 ("recipient[%i] = %p (%s)", i, recp[i], + TRACE_LOG ("recipient[%i] = %p (%s)", i, recp[i], (recp[i]->subkeys && recp[i]->subkeys->fpr) ? recp[i]->subkeys->fpr : "invalid"); i++; @@ -209,7 +209,7 @@ gpgme_op_encrypt_sign_ext_start (gpgme_ctx_t ctx, gpgme_key_t recp[], } else { - TRACE_LOG1 ("recipients = '%s'", recpstring); + TRACE_LOG ("recipients = '%s'", recpstring); } } |