From b91099b977ea7b3757adfebb3fad930ee0411c4f Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 29 Jun 2016 12:38:31 +0200 Subject: Add _X_UNUSED attribute to designate unused variables and silence warnings Signed-off-by: Jeremy Huddleston Reviewed-by: Daniel Stone Backport to nx-libs: Mike Gabriel --- nx-X11/include/Xfuncproto.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nx-X11/include') diff --git a/nx-X11/include/Xfuncproto.h b/nx-X11/include/Xfuncproto.h index a18ac19c4..f6729a0d9 100644 --- a/nx-X11/include/Xfuncproto.h +++ b/nx-X11/include/Xfuncproto.h @@ -97,4 +97,11 @@ in this Software without prior written authorization from The Open Group. # define _X_DEPRECATED #endif +/* requires xproto >= 7.0.22 */ +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205) +#define _X_UNUSED __attribute__((__unused__)) +#else +#define _X_UNUSED /* */ +#endif + #endif /* _XFUNCPROTO_H_ */ -- cgit v1.2.3