summaryrefslogtreecommitdiff
path: root/src/libudev/macro.h
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-02-21 10:20:14 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-02-21 10:20:31 -0500
commit306c786fdcca7e75268ed9903367b0fd32db5502 (patch)
tree33cf9c5e2c8d28edeed8436f2737f77fa67e7eec /src/libudev/macro.h
parent4e8d48be86ced6c8f8a85cccd63f494d5bcc0fb2 (diff)
macro: introduce a nice macro for disabling -Wformat-nonliteral temporarily
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/macro.h')
-rw-r--r--src/libudev/macro.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libudev/macro.h b/src/libudev/macro.h
index 835610caf3..088fcd2640 100644
--- a/src/libudev/macro.h
+++ b/src/libudev/macro.h
@@ -39,6 +39,11 @@
#define _public_ __attribute__ ((visibility("default")))
#define _cleanup_(x) __attribute__((cleanup(x)))
+
+#define DISABLE_WARNING_FORMAT_NONLITERAL \
+ _Pragma("GCC diagnostic push"); \
+ _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"")
+
/* Rounds up */
#define ALIGN4(l) (((l) + 3) & ~3)