core: Simplify the trace maros by using variadics.
authorWerner Koch <wk@gnupg.org>
Fri, 16 Nov 2018 15:25:49 +0000 (16:25 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 16 Nov 2018 15:25:49 +0000 (16:25 +0100)
commit5857491a2aa7d4975100d90f1ad62c08aa345e3e
treec433d2da27e7b9f98ca783e15b00087f2ce3d6cd
parent8d91c0f4cdcc26679067ae681ae12600fb450200
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>
46 files changed:
configure.ac
src/data-compat.c
src/data-estream.c
src/data-fd.c
src/data-mem.c
src/data-stream.c
src/data-user.c
src/data.c
src/debug.c
src/debug.h
src/decrypt-verify.c
src/decrypt.c
src/delete.c
src/edit.c
src/encrypt-sign.c
src/encrypt.c
src/engine-assuan.c
src/engine-g13.c
src/engine-gpg.c
src/engine-gpgsm.c
src/engine-spawn.c
src/engine-uiserver.c
src/export.c
src/genkey.c
src/getauditlog.c
src/gpgme.c
src/import.c
src/keylist.c
src/keysign.c
src/opassuan.c
src/passwd.c
src/posix-io.c
src/queryswdb.c
src/sign.c
src/signers.c
src/spawn.c
src/tofupolicy.c
src/trustlist.c
src/verify.c
src/version.c
src/vfs-create.c
src/vfs-mount.c
src/w32-glib-io.c
src/w32-io.c
src/w32-util.c
src/wait.c