diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-07-14 14:14:12 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-14 20:11:22 +0200 |
commit | dc0c8ef6bd452caf48516b4ed509351249bb2948 (patch) | |
tree | 3cf4edba9153f1e7df909dd2243ad468f45d8be1 | |
parent | 2a9987e62ab9ef20a2ea71204a48d0318e30512d (diff) | |
download | samba-dc0c8ef6bd452caf48516b4ed509351249bb2948.tar.gz samba-dc0c8ef6bd452caf48516b4ed509351249bb2948.tar.bz2 samba-dc0c8ef6bd452caf48516b4ed509351249bb2948.zip |
lib/util/attr: add _UNUSED_ marco
metze
-rw-r--r-- | lib/util/attr.h | 9 |
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 ) |