From 6648db8f910fb74c100cf24436bf0df12cba7fd7 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 27 Apr 2011 17:25:40 -0700 Subject: Add _X_UNUSED attribute to designate unused variables and silence warnings Signed-off-by: Jeremy Huddleston Reviewed-by: Daniel Stone --- Xfuncproto.h.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Xfuncproto.h.in') diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in index 2b8a226..88d91c0 100644 --- a/Xfuncproto.h.in +++ b/Xfuncproto.h.in @@ -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 */ || \ -- cgit v1.2.3