summaryrefslogtreecommitdiff
path: root/src/udev
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/udev
parentbeb999379ced9e8d765e533e43d35aab11aa5c39 (diff)
macro: introduce a nice macro for disabling -Wformat-nonliteral temporarily
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-builtin-input_id.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c
index 9b99d1ff9f..828b349d9c 100644
--- a/src/udev/udev-builtin-input_id.c
+++ b/src/udev/udev-builtin-input_id.c
@@ -38,8 +38,6 @@
#define LONG(x) ((x)/BITS_PER_LONG)
#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
/*
* Read a capability attribute and return bitmask.
* @param dev udev_device
@@ -84,11 +82,13 @@ static void get_cap_mask(struct udev_device *dev,
/* skip over leading zeros */
while (bitmask[val-1] == 0 && val > 0)
--val;
- for (i = 0; i < val; ++i)
+ for (i = 0; i < val; ++i) {
+ DISABLE_WARNING_FORMAT_NONLITERAL;
log_debug(text, i * BITS_PER_LONG, bitmask[i]);
+ REENABLE_WARNING;
+ }
}
}
-#pragma GCC diagnostic pop
/* pointer devices */
static void test_pointers (struct udev_device *dev,