From 6393b1a57a68101c9755f0e335921535932c64be Mon Sep 17 00:00:00 2001
From: Claus-Justus Heine <Claus-Justus.Heine@IANS.Uni-Stuttgart.DE>
Date: Fri, 2 Oct 2015 14:03:29 +0000
Subject: [PATCH] Fiddle a little bit with unused attribute.

---
 alberta_util/src/alberta_util.h.in.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/alberta_util/src/alberta_util.h.in.in b/alberta_util/src/alberta_util.h.in.in
index 386b9cd..dcb2ca0 100644
--- a/alberta_util/src/alberta_util.h.in.in
+++ b/alberta_util/src/alberta_util.h.in.in
@@ -81,14 +81,18 @@ typedef bool _Bool;
 # define __bool_true_false_are_defined 1
 #endif
 
-#if defined(__GNUC__)
+#if HAS_ATTRIBUTE_UNUSED || defined(__GNUC__)
 # define __ATTRIBUTE_UNUSED__ __attribute__((unused))
+#else
+# define __ATTRIBUTE_UNUSED__  /* nothing */
+#endif
+
+#if defined(__GNUC__)
 # define __LIKELY__(arg)   __builtin_expect(arg, true)
 # define __UNLIKELY__(arg) __builtin_expect(arg, false)
 #else
 # define __LIKELY__(arg)       (arg)
 # define __UNLIKELY__(arg)     (arg)
-# define __UNUSED_ATTRIBUTE__  /* nothing */
 #endif
 
 #if !ALBERTA_DEBUG\
-- 
GitLab