diff options
-rw-r--r-- | dbus-gmain.c | 5 | ||||
-rw-r--r-- | tests/30574.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/dbus-gmain.c b/dbus-gmain.c index 06a480c..ee4e8ca 100644 --- a/dbus-gmain.c +++ b/dbus-gmain.c @@ -258,8 +258,9 @@ connection_setup_add_watch (ConnectionSetup *cs, channel = g_io_channel_unix_new (dbus_watch_get_unix_fd (watch)); handler->source = g_io_create_watch (channel, condition); - g_source_set_callback (handler->source, (GSourceFunc) io_handler_dispatch, handler, - io_handler_source_finalized); + g_source_set_callback (handler->source, + (GSourceFunc) (void (*) (void)) io_handler_dispatch, + handler, io_handler_source_finalized); g_source_attach (handler->source, cs->context); cs->ios = g_slist_prepend (cs->ios, handler); diff --git a/tests/30574.c b/tests/30574.c index bcc1276..7098b55 100644 --- a/tests/30574.c +++ b/tests/30574.c @@ -54,12 +54,14 @@ set_reply (DBusPendingCall * pending, void *user_data) } static DBusMessage * -send_and_allow_reentry (DBusConnection * bus, DBusMessage * message, +send_and_allow_reentry (DBusConnection *conn, DBusMessage *message, dbus_bool_t switch_after_send) { DBusPendingCall *pending; SpiReentrantCallClosure closure; + g_assert (conn == bus); + closure.loop = g_main_loop_new (main_context, FALSE); DBUS_GMAIN_FUNCTION_NAME (set_up_connection) (bus, (switch_after_send ? NULL : |