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://review.tizen.org/git/?a=commitdiff_plain;h=c8304ba9027aa2bbca3aa9dfe9fcc951c16932e6;p=platform%2Fupstream%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 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)