Skip to content
Commit 8bb24c57 authored by Christophe Fergeau's avatar Christophe Fergeau
Browse files

build-sys: Disable -Wcast-function-type



With gcc 8.0.1 from Fedora 28, I'm getting warnings related to
-Wcast-function-type in a few places. Most of these could be solved
by adding an intermediate wrapper with the right number of args, but the
g_source_set_callback() warning cannot be solved this way as the
callback signature will vary depending on the source it's called on.

../../src/spice-session.c: In function 'spice_session_init':
../../src/spice-session.c:293:33: warning: cast between incompatible function types from 'pixman_bool_t (*)(pixman_image_t *)' {aka 'int (*)(union pixman_image *)'} to 'void (*)(void *)' [-Wcast-function-type]
     s->images = cache_image_new((GDestroyNotify)pixman_image_unref);
                                 ^
../../src/gio-coroutine.c: In function 'g_coroutine_socket_wait':
../../src/gio-coroutine.c:59:32: warning: cast between incompatible function types from 'gboolean (*)(GSocket *, GIOCondition,  void *)' {aka 'int (*)(struct _GSocket *, enum <anonymous>,  void *)'} to 'gboolean (*)(void *)' {aka 'int (*)(void *)'} [-Wcast-function-type]
     g_source_set_callback(src, (GSourceFunc)g_io_wait_helper, self, NULL);
                                ^
(and a few more like these)

Acked-by: default avatarFrediano Ziglio <fziglio@redhat.com>
parent 7d119752
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment