aboutsummaryrefslogtreecommitdiffstats
path: root/src/spawn.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/spawn.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/spawn.c')
-rw-r--r--src/spawn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/spawn.c b/src/spawn.c
index a4d5e8de..c5431b14 100644
--- a/src/spawn.c
+++ b/src/spawn.c
@@ -70,7 +70,7 @@ gpgme_op_spawn_start (gpgme_ctx_t ctx, const char *file, const char *argv[],
{
gpgme_error_t err;
- TRACE_BEG2 (DEBUG_CTX, "gpgme_op_spawn_start", ctx, "file=(%s) flaggs=%x",
+ TRACE_BEG (DEBUG_CTX, "gpgme_op_spawn_start", ctx, "file=(%s) flaggs=%x",
file, flags);
if (!ctx)
@@ -93,7 +93,7 @@ gpgme_op_spawn (gpgme_ctx_t ctx, const char *file, const char *argv[],
{
gpgme_error_t err;
- TRACE_BEG2 (DEBUG_CTX, "gpgme_op_spawn", ctx, "file=(%s) flags=%x",
+ TRACE_BEG (DEBUG_CTX, "gpgme_op_spawn", ctx, "file=(%s) flags=%x",
file, flags);
if (!ctx)
return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));