From 031fa3465749da51b958fdd4efbfda5438643753 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 7 Oct 2016 19:28:47 +0100 Subject: [PATCH 10/13] Enable format, noreturn, unused attributes for clang 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 --- dbus/dbus-macros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h index a82d911..0e784fe 100644 --- a/dbus/dbus-macros.h +++ b/dbus/dbus-macros.h @@ -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 \ -- 2.9.3