summaryrefslogtreecommitdiff
path: root/src/core/kmod-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-20 18:18:32 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-20 18:18:32 +0100
commitbcfce235a3d757f0ec3b0c01e8583382db1adfe2 (patch)
tree78a0c2102a7b0db526c01abeb352e77e708f418e /src/core/kmod-setup.c
parentbeb999379ced9e8d765e533e43d35aab11aa5c39 (diff)
macro: introduce a nice macro for disabling -Wformat-nonliteral temporarily
Diffstat (limited to 'src/core/kmod-setup.c')
-rw-r--r--src/core/kmod-setup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index 9709d364f8..0791ae8ead 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -30,9 +30,6 @@
#include "kmod-setup.h"
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-
static void systemd_kmod_log(
void *data,
int priority,
@@ -42,11 +39,11 @@ static void systemd_kmod_log(
va_list args) {
/* library logging is enabled at debug only */
+ DISABLE_WARNING_FORMAT_NONLITERAL;
log_metav(LOG_DEBUG, file, line, fn, format, args);
+ REENABLE_WARNING;
}
-#pragma GCC diagnostic pop
-
static bool cmdline_check_kdbus(void) {
_cleanup_free_ char *line = NULL;