From c8304ba9027aa2bbca3aa9dfe9fcc951c16932e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 20 Apr 2017 14:45:30 -0400 Subject: [PATCH] =?utf8?q?=C2=B5httpd-util:=20use=20#pragma=20to=20silence?= =?utf8?q?=20warning=20about=20nonliteral=20pattern?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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(+) diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c index cae1020..f5d2d79 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) -- 2.7.4