summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/util/attr.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/util/attr.h b/lib/util/attr.h
index a2690613fb..b72696a8dc 100644
--- a/lib/util/attr.h
+++ b/lib/util/attr.h
@@ -20,14 +20,19 @@
#ifndef __UTIL_ATTR_H__
#define __UTIL_ATTR_H__
+#ifndef _UNUSED_
#ifdef __GNUC__
/** gcc attribute used on function parameters so that it does not emit
* warnings about them being unused. **/
-# define UNUSED(param) param __attribute__ ((unused))
+# define _UNUSED_ __attribute__ ((unused))
#else
-# define UNUSED(param) param
+# define _UNUSED_
/** Feel free to add definitions for other compilers here. */
#endif
+#endif
+#ifndef UNUSED
+#define UNUSED(param) param _UNUSED_
+#endif
#ifndef _DEPRECATED_
#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )