From e05d7abbcf880099058b699ac52f65edcac95582 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 24 Apr 2011 19:39:26 -0700 Subject: Silence warnings when building with clang /usr/X11/include/X11/Xtrans/Xtransint.h:349:12: error: unused function 'is_numeric' [-Werror,-Wunused-function] static int is_numeric ( ^ /usr/X11/include/X11/Xtrans/Xtransint.h:354:12: error: unused function 'trans_mkdir' [-Werror,-Wunused-function] static int trans_mkdir ( ^ In file included from /usr/X11/include/X11/Xtrans/transport.c:67: ... fatal error: too many errors emitted, stopping now [-ferror-limit=] Signed-off-by: Jeremy Huddleston --- Xtransint.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Xtransint.h') diff --git a/Xtransint.h b/Xtransint.h index dd1f683..ff3fd0b 100644 --- a/Xtransint.h +++ b/Xtransint.h @@ -307,6 +307,12 @@ typedef struct _Xtransport_table { /* Flags to preserve when setting others */ #define TRANS_KEEPFLAGS (TRANS_NOUNLINK|TRANS_ABSTRACT) +#ifdef __clang__ +/* Not all clients make use of all provided statics */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-function" +#endif + /* * readv() and writev() don't exist or don't work correctly on some * systems, so they may be emulated. @@ -357,6 +363,10 @@ static int trans_mkdir ( ); #endif +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + /* * Some XTRANSDEBUG stuff */ -- cgit v1.2.1