From 5857491a2aa7d4975100d90f1ad62c08aa345e3e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 16 Nov 2018 16:25:49 +0100 Subject: 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 : 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 --- src/vfs-create.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vfs-create.c') diff --git a/src/vfs-create.c b/src/vfs-create.c index 1e23106a..51b8307c 100644 --- a/src/vfs-create.c +++ b/src/vfs-create.c @@ -179,7 +179,7 @@ gpgme_op_vfs_create (gpgme_ctx_t ctx, gpgme_key_t recp[], { gpg_error_t err; - TRACE_BEG3 (DEBUG_CTX, "gpgme_op_vfs_create", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_vfs_create", ctx, "container_file=%s, flags=0x%x, op_err=%p", container_file, flags, op_err); @@ -192,7 +192,7 @@ gpgme_op_vfs_create (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++; -- cgit v1.2.3