aboutsummaryrefslogtreecommitdiffstats
path: root/src/wait.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/wait.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/wait.c')
-rw-r--r--src/wait.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wait.c b/src/wait.c
index a011b123..1da9e93d 100644
--- a/src/wait.c
+++ b/src/wait.c
@@ -136,7 +136,7 @@ _gpgme_add_io_cb (void *data, int fd, int dir, gpgme_io_cb_t fnc,
return err;
}
- TRACE3 (DEBUG_CTX, "_gpgme_add_io_cb", ctx,
+ TRACE (DEBUG_CTX, "_gpgme_add_io_cb", ctx,
"fd %d, dir=%d -> tag=%p", fd, dir, tag);
*r_tag = tag;
@@ -159,7 +159,7 @@ _gpgme_remove_io_cb (void *data)
assert (fdt);
idx = tag->idx;
- TRACE2 (DEBUG_CTX, "_gpgme_remove_io_cb", data,
+ TRACE (DEBUG_CTX, "_gpgme_remove_io_cb", data,
"setting fd 0x%x (item=%p) done", fdt->fds[idx].fd,
fdt->fds[idx].opaque);
@@ -196,7 +196,7 @@ _gpgme_run_io_cb (struct io_select_fd_s *an_fds, int checked,
int nr;
struct io_select_fd_s fds;
- TRACE0 (DEBUG_CTX, "_gpgme_run_io_cb", item, "need to check");
+ TRACE (DEBUG_CTX, "_gpgme_run_io_cb", item, "need to check");
fds = *an_fds;
fds.signaled = 0;
/* Just give it a quick poll. */
@@ -210,7 +210,7 @@ _gpgme_run_io_cb (struct io_select_fd_s *an_fds, int checked,
return 0;
}
- TRACE2 (DEBUG_CTX, "_gpgme_run_io_cb", item, "handler (%p, %d)",
+ TRACE (DEBUG_CTX, "_gpgme_run_io_cb", item, "handler (%p, %d)",
item->handler_value, an_fds->fd);
iocb_data.handler_value = item->handler_value;