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
-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()
#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