aboutsummaryrefslogtreecommitdiff
path: root/cbs.h
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-04 23:55:20 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-04 23:55:20 +0100
commit07fda3fa04f9acf9b548c99446155c6dcfce1d2d (patch)
tree9a987039ae8b339c3202066b5bb8d6348533037e /cbs.h
parent9ea608bf9e969890e7da9417259c282e4b3f0323 (diff)
Don’t issue ‘unused-function’ warnings on GCC
Diffstat (limited to 'cbs.h')
-rw-r--r--cbs.h9
1 files changed, 9 insertions, 0 deletions
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 */