From f276a46cb9b1387aed1542882f6341c1510c955f Mon Sep 17 00:00:00 2001 From: Florian Franzmann Date: Sat, 5 Sep 2020 18:03:31 +0200 Subject: [PATCH] Suppress warnings about non-literal format strings --- hmland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hmland.c b/hmland.c index 35f8192..8651957 100644 --- a/hmland.c +++ b/hmland.c @@ -116,12 +116,18 @@ static void write_log(const char *buf, int len, const char *fmt, ...) if (fmt) { if (logfile) { va_start(ap, fmt); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" vfprintf(logfile, fmt, ap); +#pragma GCC diagnostic pop va_end(ap); } if (verbose) { va_start(ap, fmt); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" vprintf(fmt, ap); +#pragma GCC diagnostic pop va_end(ap); } } -- 2.39.5