lib/util/attr: add _UNUSED_ marco
authorStefan Metzmacher <metze@samba.org>
Thu, 14 Jul 2011 12:14:12 +0000 (14:14 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 Jul 2011 18:11:22 +0000 (20:11 +0200)
metze

lib/util/attr.h

index a2690613fb14a1fc35eeea954809fa3018419866..b72696a8dc3c8ca515d273b3cc8683c617fa409d 100644 (file)
 #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 )