aboutsummaryrefslogtreecommitdiffstats
path: root/src/signers.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-11-16 15:25:49 +0000
committerWerner Koch <[email protected]>2018-11-16 15:25:49 +0000
commit5857491a2aa7d4975100d90f1ad62c08aa345e3e (patch)
treec433d2da27e7b9f98ca783e15b00087f2ce3d6cd /src/signers.c
parentAdd SPDX identifiers to most source files (diff)
downloadgpgme-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/signers.c')
-rw-r--r--src/signers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/signers.c b/src/signers.c
index fe2d6786..6a5ccd22 100644
--- a/src/signers.c
+++ b/src/signers.c
@@ -56,7 +56,7 @@ _gpgme_signers_clear (gpgme_ctx_t ctx)
void
gpgme_signers_clear (gpgme_ctx_t ctx)
{
- TRACE (DEBUG_CTX, "gpgme_signers_clear", ctx);
+ TRACE (DEBUG_CTX, "gpgme_signers_clear", ctx, "");
_gpgme_signers_clear (ctx);
}
@@ -65,7 +65,7 @@ gpgme_signers_clear (gpgme_ctx_t ctx)
gpgme_error_t
gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key)
{
- TRACE_BEG2 (DEBUG_CTX, "gpgme_signers_add", ctx,
+ TRACE_BEG (DEBUG_CTX, "gpgme_signers_add", ctx,
"key=%p (%s)", key, (key && key->subkeys && key->subkeys->fpr) ?
key->subkeys->fpr : "invalid");
@@ -89,7 +89,7 @@ gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key)
gpgme_key_ref (key);
ctx->signers[ctx->signers_len++] = key;
- return TRACE_SUC ();
+ return TRACE_SUC ("");
}