summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-04-27 17:25:40 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-04-28 18:23:36 -0700
commit6648db8f910fb74c100cf24436bf0df12cba7fd7 (patch)
tree574e2e260eabd88d3842286bf20e4a687826a1bf
parent19c12c60c22d5a23039bc90845a6ecacdd64f2db (diff)
downloadxorg-proto-x11proto-6648db8f910fb74c100cf24436bf0df12cba7fd7.tar.gz
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>
-rw-r--r--Xfuncproto.h.in6
1 files changed, 6 insertions, 0 deletions
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 */ || \