core: Fix compiler warning from casting functions
diff --git a/src/advertising.c b/src/advertising.c
index b087b48..ddc7133 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -1231,11 +1231,15 @@
manager_destroy(manager);
}
+static void manager_refresh(void *data, void *user_data)
+{
+ refresh_adv(data, user_data);
+}
+
void btd_adv_manager_refresh(struct btd_adv_manager *manager)
{
if (!manager)
return;
- queue_foreach(manager->clients, (queue_foreach_func_t)refresh_adv,
- NULL);
+ queue_foreach(manager->clients, manager_refresh, NULL);
}
diff --git a/src/gatt-client.c b/src/gatt-client.c
index d3b699d..234f46e 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -2208,6 +2208,11 @@
client->notify_id = 0;
}
+static void client_shutdown(void *data)
+{
+ io_shutdown(data);
+}
+
void btd_gatt_client_disconnected(struct btd_gatt_client *client)
{
if (!client || !client->gatt)
@@ -2215,8 +2220,7 @@
DBG("Device disconnected. Cleaning up.");
- queue_remove_all(client->ios, NULL, NULL,
- (queue_destroy_func_t) io_shutdown);
+ queue_remove_all(client->ios, NULL, NULL, client_shutdown);
/*
* TODO: Once GATT over BR/EDR is properly supported, we should pass the
diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 6b97ee7..2e153db 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -2183,13 +2183,17 @@
return cancel_request(req);
}
+static void cancel_pending(void *data)
+{
+ cancel_request(data);
+}
+
bool bt_gatt_client_cancel_all(struct bt_gatt_client *client)
{
if (!client || !client->att)
return false;
- queue_remove_all(client->pending_requests, NULL, NULL,
- (queue_destroy_func_t) cancel_request);
+ queue_remove_all(client->pending_requests, NULL, NULL, cancel_pending);
if (client->discovery_req) {
bt_gatt_request_cancel(client->discovery_req);