From c8304ba9027aa2bbca3aa9dfe9fcc951c16932e6 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 20 Apr 2017 14:45:30 -0400 Subject: µhttpd-util: use #pragma to silence warning about nonliteral pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is safe, because we're taking a pattern which was already marked with _printf_ and appending a literal string. --- src/journal-remote/microhttpd-util.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/journal-remote/microhttpd-util.c') diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c index cae10203c6..f5d2d7967a 100644 --- a/src/journal-remote/microhttpd-util.c +++ b/src/journal-remote/microhttpd-util.c @@ -103,7 +103,10 @@ int mhd_respondf(struct MHD_Connection *connection, errno = -error; fmt = strjoina(format, "\n"); va_start(ap, format); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" r = vasprintf(&m, fmt, ap); +#pragma GCC diagnostic pop va_end(ap); if (r < 0) -- cgit v1.2.3-54-g00ecf