From: Zbigniew Jędrzejewski-Szmek Date: Thu, 20 Apr 2017 18:45:30 +0000 (-0400) Subject: µhttpd-util: use #pragma to silence warning about nonliteral pattern X-Git-Tag: v234~305^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8304ba9027aa2bbca3aa9dfe9fcc951c16932e6;p=thirdparty%2Fsystemd.git µhttpd-util: use #pragma to silence warning about nonliteral pattern This is safe, because we're taking a pattern which was already marked with _printf_ and appending a literal string. --- diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c index cae10203c67..f5d2d7967ac 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)