From e6c447d02a406209c56d5ca92ce7660a31b2c114 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 17 Dec 2017 07:58:43 -0800 Subject: build: suppress sig-handler.h's -Wcast-function-type warning * configure.ac (WERROR_CFLAGS): Add -Wno-cast-function-type to suppress warning about sig-handler.h's sa_handler_t cast: sig-handler.h: In function 'get_handler': sig-handler.h:47:12: error: cast between incompatible function\ types from 'void (* const)(int, siginfo_t *, void *)'\ {aka 'void (* const)(int, struct *, void *)'}\ to 'void (*)(int)' [-Werror=cast-function-type] return (sa_handler_t) a->sa_sigaction; --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 032c91b6..59153dc1 100644 --- a/configure.ac +++ b/configure.ac @@ -149,6 +149,7 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now + gl_WARN_ADD([-Wno-cast-function-type]) # sig-handler.h's sa_handler_t cast # In spite of excluding -Wlogical-op above, it is enabled, as of # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c -- cgit v1.2.1