summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-20 14:45:30 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-21 13:36:48 -0400
commitc8304ba9027aa2bbca3aa9dfe9fcc951c16932e6 (patch)
treeae3610acef6fd871863f247465eba88351149912
parent032b75419d7ad6cab188d1ff5c5d1d322eff1171 (diff)
µ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.
-rw-r--r--src/journal-remote/microhttpd-util.c3
1 files changed, 3 insertions, 0 deletions
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)