summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/microhttpd-util.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c
index c45d0df722..3844f7a03c 100644
--- a/src/journal/microhttpd-util.c
+++ b/src/journal/microhttpd-util.c
@@ -27,14 +27,15 @@
#include "macro.h"
#include "util.h"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
- _cleanup_free_ char *f;
+ _cleanup_free_ char *f = NULL;
+
if (asprintf(&f, "microhttpd: %s", fmt) <= 0) {
log_oom();
return;
}
+
+ DISABLE_WARNING_FORMAT_NONLITERAL;
log_metav(LOG_INFO, NULL, 0, NULL, f, ap);
+ REENABLE_WARNING;
}
-#pragma GCC diagnostic pop