From dc0c8ef6bd452caf48516b4ed509351249bb2948 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Jul 2011 14:14:12 +0200 Subject: lib/util/attr: add _UNUSED_ marco metze --- lib/util/attr.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') 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 ) -- cgit