aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-util.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/w32-util.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/w32-util.c')
-rw-r--r--src/w32-util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/w32-util.c b/src/w32-util.c
index 7992b618..1f8ef6dc 100644
--- a/src/w32-util.c
+++ b/src/w32-util.c
@@ -220,19 +220,19 @@ _gpgme_allow_set_foreground_window (pid_t pid)
if (!pid || pid == (pid_t)(-1))
{
- TRACE1 (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0,
+ TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0,
"no action for pid %d", (int)pid);
}
else if (func)
{
int rc = func (pid);
- TRACE2 (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0,
+ TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0,
"called for pid %d; result=%d", (int)pid, rc);
}
else
{
- TRACE0 (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0,
+ TRACE (DEBUG_ENGINE, "gpgme:AllowSetForegroundWindow", 0,
"function not available");
}
#endif /* HAVE_ALLOW_SET_FOREGROUND_WINDOW */
@@ -268,13 +268,13 @@ _gpgme_w32_cancel_synchronous_io (HANDLE thread)
{
if (!func (thread) && GetLastError() != ERROR_NOT_FOUND)
{
- TRACE2 (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", 0,
+ TRACE (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", 0,
"called for thread %p: ec=%d", thread, GetLastError ());
}
}
else
{
- TRACE0 (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", 0,
+ TRACE (DEBUG_ENGINE, "gpgme:CancelSynchronousIo", 0,
"function not available");
}
}