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/edit.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/edit.c')
-rw-r--r-- | src/edit.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -158,7 +158,7 @@ gpgme_op_interact_start (gpgme_ctx_t ctx, gpgme_key_t key, unsigned int flags, { gpgme_error_t err; - TRACE_BEG5 (DEBUG_CTX, "gpgme_op_interact_start", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_interact_start", ctx, "key=%p flags=0x%x fnc=%p fnc_value=%p, out=%p", key, flags,fnc, fnc_value, out); @@ -177,7 +177,7 @@ gpgme_op_interact (gpgme_ctx_t ctx, gpgme_key_t key, unsigned int flags, { gpgme_error_t err; - TRACE_BEG5 (DEBUG_CTX, "gpgme_op_interact", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_interact", ctx, "key=%p flags=0x%x fnc=%p fnc_value=%p, out=%p", key, flags,fnc, fnc_value, out); @@ -234,7 +234,7 @@ gpgme_op_edit_start (gpgme_ctx_t ctx, gpgme_key_t key, { gpgme_error_t err; - TRACE_BEG5 (DEBUG_CTX, "gpgme_op_edit_start", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_edit_start", ctx, "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, (key && key->subkeys && key->subkeys->fpr) ? key->subkeys->fpr : "invalid", fnc, fnc_value, out); @@ -255,7 +255,7 @@ gpgme_op_edit (gpgme_ctx_t ctx, gpgme_key_t key, { gpgme_error_t err; - TRACE_BEG5 (DEBUG_CTX, "gpgme_op_edit", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_edit", ctx, "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, (key && key->subkeys && key->subkeys->fpr) ? key->subkeys->fpr : "invalid", fnc, fnc_value, out); @@ -278,7 +278,7 @@ gpgme_op_card_edit_start (gpgme_ctx_t ctx, gpgme_key_t key, { gpgme_error_t err; - TRACE_BEG5 (DEBUG_CTX, "gpgme_op_card_edit_start", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_card_edit_start", ctx, "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, (key && key->subkeys && key->subkeys->fpr) ? key->subkeys->fpr : "invalid", fnc, fnc_value, out); @@ -299,7 +299,7 @@ gpgme_op_card_edit (gpgme_ctx_t ctx, gpgme_key_t key, { gpgme_error_t err; - TRACE_BEG5 (DEBUG_CTX, "gpgme_op_card_edit", ctx, + TRACE_BEG (DEBUG_CTX, "gpgme_op_card_edit", ctx, "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, (key && key->subkeys && key->subkeys->fpr) ? key->subkeys->fpr : "invalid", fnc, fnc_value, out); |