From 07fda3fa04f9acf9b548c99446155c6dcfce1d2d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 4 Jan 2024 23:55:20 +0100 Subject: Don’t issue ‘unused-function’ warnings on GCC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cbs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cbs.h b/cbs.h index b16128b..f319ea6 100644 --- a/cbs.h +++ b/cbs.h @@ -37,6 +37,11 @@ #ifndef C_BUILD_SYSTEM_H #define C_BUILD_SYSTEM_H +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif + /* Assert that the user is building for a supported platform. The only portable way to check for POSIX is to validate that unistd.h exists. This is only possible without compiler extensions in C23 (although some compilers support @@ -875,4 +880,8 @@ tpwait(tpool_t *tp) #endif /* CBS_PTHREAD */ +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + #endif /* !C_BUILD_SYSTEM_H */ -- cgit v1.2.3