summaryrefslogtreecommitdiff
path: root/src/version.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-11-16 16:25:49 +0100
committerWerner Koch <wk@gnupg.org>2018-11-16 16:25:49 +0100
commit5857491a2aa7d4975100d90f1ad62c08aa345e3e (patch)
treec433d2da27e7b9f98ca783e15b00087f2ce3d6cd /src/version.c
parent8d91c0f4cdcc26679067ae681ae12600fb450200 (diff)
downloadgpgme-5857491a2aa7d4975100d90f1ad62c08aa345e3e.tar.gz
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 <wk@gnupg.org>
Diffstat (limited to 'src/version.c')
-rw-r--r--src/version.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/version.c b/src/version.c
index e1d8e592..8c35ed0e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -202,7 +202,7 @@ gpgme_check_version (const char *req_version)
before using the trace facility. If we won't the trace would
automagically initialize the debug system with out the locks
being initialized and missing the assuan log level setting. */
- TRACE2 (DEBUG_INIT, "gpgme_check_version", 0,
+ TRACE (DEBUG_INIT, "gpgme_check_version", 0,
"req_version=%s, VERSION=%s",
req_version? req_version:"(null)", VERSION);
@@ -229,13 +229,13 @@ gpgme_check_version_internal (const char *req_version,
return result;
/* Catch-22, see above. */
- TRACE2 (DEBUG_INIT, "gpgme_check_version_internal", 0,
+ TRACE (DEBUG_INIT, "gpgme_check_version_internal", 0,
"req_version=%s, offset_sig_validity=%i",
req_version ? req_version : "(null)", offset_sig_validity);
if (offset_sig_validity != offsetof (struct _gpgme_signature, validity))
{
- TRACE1 (DEBUG_INIT, "gpgme_check_version_internal", 0,
+ TRACE (DEBUG_INIT, "gpgme_check_version_internal", 0,
"offset_sig_validity mismatch: expected %i",
offsetof (struct _gpgme_signature, validity));
_gpgme_selftest = GPG_ERR_SELFTEST_FAILED;