From 4b48ada92bb8ed30e369e37ff3a2108fedaf2a4c Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 2 Jul 2018 10:01:05 +0200 Subject: [PATCH 1/2] configure: Pass -Wno-cast-function-type if available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plymouth uses function type casts for callbacks in quite a few places, fixing these needlessly complicates the code, so lets pass -Wno-cast-function-type. This fixes 218 warnings like this one: ply-command-parser.c: In function ‘ply_command_parser_stop_parsing_arguments’: ply-command-parser.c:680:48: warning: cast between incompatible function types from ‘void (*)(ply_command_parser_t *)’ {aka ‘void (*)(struct _ply_command_parser *)’} to ‘void (*)(void *, int, ply_event_loop_t *)’ {aka ‘void (*)(void *, int, struct _ply_event_loop *)’} [-Wcast-function-type] (ply_event_loop_exit_handler_t) Signed-off-by: Hans de Goede --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index b51a700..0382773 100644 --- a/configure.ac +++ b/configure.ac @@ -227,6 +227,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wwrite-strings -Wnested-externs -Wpointer-arith \ -Wswitch-enum -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \ -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-result \ + -Wno-cast-function-type \ -Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2" elif test "$GCC" = "yes"; then AC_MSG_RESULT(no) -- 2.17.1