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/data-user.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/data-user.c')
-rw-r--r-- | src/data-user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/data-user.c b/src/data-user.c index d1d85250..f5bd2efb 100644 --- a/src/data-user.c +++ b/src/data-user.c @@ -92,7 +92,7 @@ gpgme_error_t gpgme_data_new_from_cbs (gpgme_data_t *r_dh, gpgme_data_cbs_t cbs, void *handle) { gpgme_error_t err; - TRACE_BEG1 (DEBUG_DATA, "gpgme_data_new_from_cbs", r_dh, "handle=%p", handle); + TRACE_BEG (DEBUG_DATA, "gpgme_data_new_from_cbs", r_dh, "handle=%p", handle); err = _gpgme_data_new (r_dh, &user_cbs); if (err) @@ -100,5 +100,5 @@ gpgme_data_new_from_cbs (gpgme_data_t *r_dh, gpgme_data_cbs_t cbs, void *handle) (*r_dh)->data.user.cbs = cbs; (*r_dh)->data.user.handle = handle; - return TRACE_SUC1 ("dh=%p", *r_dh); + return TRACE_SUC ("dh=%p", *r_dh); } |