Add _X_UNUSED attribute to designate unused variables and silence warnings

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Jeremy Huddleston 2011-04-27 17:25:40 -07:00
parent 19c12c60c2
commit 6648db8f91

View file

@ -122,6 +122,12 @@ in this Software without prior written authorization from The Open Group.
# define _X_ATTRIBUTE_PRINTF(x,y)
#endif
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
#define _X_UNUSED __attribute__((__unused__))
#else
#define _X_UNUSED /* */
#endif
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
#if defined(inline) /* assume autoconf set it correctly */ || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \