summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-09-04 14:51:09 +0100
committerSimon McVittie <smcv@collabora.com>2022-09-05 09:18:53 +0100
commite9aa22ce379fad9d0a6d261ab1c1ef6ffc105838 (patch)
tree29549a12f9a9e4fa66d22554e4970f6cde856178
parent07fe4f6b356dac23240ad38a20af25c850726515 (diff)
Clean up some compiler warnings
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--dbus-gmain.c5
-rw-r--r--tests/30574.c4
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 :