summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzat Khuzhin <azat@libevent.org>2022-07-09 17:08:21 +0300
committerAzat Khuzhin <azat@libevent.org>2022-07-09 17:17:06 +0300
commit3960449374595248577fa916dc1a40f49badd03f (patch)
tree2691b1dba5bd952026e9e41aeb64d6a646eb851e
parent92b73c7d555a57f4143027ad7faf10b3125bb002 (diff)
downloadlibevent-3960449374595248577fa916dc1a40f49badd03f.tar.gz
Detech -Wno-unused-functions for GCC too
Otherwise build fails [1]: /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/minheap-internal.h:64:6: error: ‘min_heap_ctor_’ defined but not used [-Werror=unused-function] void min_heap_ctor_(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; } ^~~~~~~~~~~~~~ In file included from /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/buffer.c:91:0: /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/bufferevent-internal.h:414:1: error: ‘bufferevent_trigger_nolock_’ defined but not used [-Werror=unused-function] bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/buffer.c:89:0: /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/evthread-internal.h:140:1: error: ‘EVLOCK_TRY_LOCK_’ defined but not used [-Werror=unused-function] EVLOCK_TRY_LOCK_(void *lock) [1]: https://github.com/libevent/libevent/runs/7263518180?check_suite_focus=true
-rw-r--r--CMakeLists.txt4
-rw-r--r--configure.ac6
2 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db345b02..799673de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -314,11 +314,13 @@ if (${GNUC})
-Wlogical-op
-Wwrite-strings
+
+ # Disable unused-function warnings. These trigger for minheap-internal.h.
+ -Wno-unused-function
)
if (${CLANG})
list(APPEND __FLAGS
- -Wno-unused-function
# we use this hack in tests
-Wno-void-pointer-to-enum-cast)
endif()
diff --git a/configure.ac b/configure.ac
index a93f0304..85e02bd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -775,10 +775,10 @@ if test "$enable_gcc_warnings" != "no" && test "$GCC" = "yes"; then
#error
#endif])], have_clang=yes, have_clang=no)
- if test "$have_clang" = "yes"; then
- dnl Disable unused-function warnings. These trigger for minheap-internal.h.
- AX_CHECK_COMPILE_FLAG([-Wno-unused-function], [CFLAGS="$CFLAGS -Wno-unused-function"],[],[-Werror])
+ dnl Disable unused-function warnings. These trigger for minheap-internal.h.
+ AX_CHECK_COMPILE_FLAG([-Wno-unused-function], [CFLAGS="$CFLAGS -Wno-unused-function"],[],[-Werror])
+ if test "$have_clang" = "yes"; then
case "$host_os" in
darwin*)
dnl Clang on macOS emits warnings for each directory specified which