From: Markus Armbruster Date: Wed, 30 Dec 2020 12:40:47 +0000 (+0100) Subject: common/pathfind: A more portable DPRINTF() X-Git-Tag: v4.4.1~48 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=a0d1f63729c4a867717bb48d7a9e45348502ddbf common/pathfind: A more portable DPRINTF() C99 requires at least one argument for the "..." in a variadic macro. GCC and Clang don't care, but warn with -pedantic. Solaris cc warns. The warning is easy to avoid, so do it. Signed-off-by: Markus Armbruster --- diff --git a/src/lib/common/pathfind.c b/src/lib/common/pathfind.c index 0db83e086..8d6a3c67b 100644 --- a/src/lib/common/pathfind.c +++ b/src/lib/common/pathfind.c @@ -27,7 +27,7 @@ * pathfind.c: Find cheapest paths * * Known contributors to this file: - * Markus Armbruster, 2014 + * Markus Armbruster, 2014-2020 */ #include @@ -42,9 +42,9 @@ #include "sect.h" #ifdef PATH_FIND_DEBUG -#define DPRINTF(fmt, ...) ((void)printf(fmt , ## __VA_ARGS__)) +#define DPRINTF(...) ((void)fprintf(stdout, ## __VA_ARGS__)) #else -#define DPRINTF(fmt, ...) ((void)0) +#define DPRINTF(...) ((void)0) #endif static char *bufrotate(char *buf, size_t bufsz, size_t i);