]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
configure: Pass -Wno-cast-function-type if available
authorHans de Goede <hdegoede@redhat.com>
Mon, 2 Jul 2018 08:01:05 +0000 (10:01 +0200)
committerRay Strode <rstrode@redhat.com>
Tue, 10 Jul 2018 19:47:14 +0000 (15:47 -0400)
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 <hdegoede@redhat.com>
configure.ac

index b51a700e7615f7ea203b4f0932d94934c3dbfe39..0382773f1aea084f6e7014aacf88bd4865bb4d19 100644 (file)
@@ -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)