Enable format, noreturn, unused attributes for clang
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 7 Oct 2016 18:28:47 +0000 (19:28 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 13 Oct 2016 21:44:13 +0000 (22:44 +0100)
I'm assuming here that any version of clang will be new enough to
understand gcc 2.4 features, which seems rather safe.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-macros.h

index a82d911..0e784fe 100644 (file)
@@ -64,7 +64,8 @@
 #  define _DBUS_GNUC_EXTENSION
 #endif
 
-#if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#if     (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) || \
+         defined(__clang__)
 #define _DBUS_GNUC_PRINTF( format_idx, arg_idx )    \
   __attribute__((__format__ (__printf__, format_idx, arg_idx)))
 #define _DBUS_GNUC_NORETURN                         \