gobex: Fix compiler warning from casting functions
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c
index cd5c131..a89f5b6 100644
--- a/gobex/gobex-packet.c
+++ b/gobex/gobex-packet.c
@@ -260,6 +260,11 @@
return pkt;
}
+static void header_free(void *data, void *user_data)
+{
+ g_obex_header_free(data);
+}
+
void g_obex_packet_free(GObexPacket *pkt)
{
g_obex_debug(G_OBEX_DEBUG_PACKET, "opcode 0x%02x", pkt->opcode);
@@ -273,7 +278,7 @@
break;
}
- g_slist_foreach(pkt->headers, (GFunc) g_obex_header_free, NULL);
+ g_slist_foreach(pkt->headers, header_free, NULL);
g_slist_free(pkt->headers);
g_free(pkt);
}
diff --git a/gobex/gobex.c b/gobex/gobex.c
index 0e5817e..ef5355a 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -1508,6 +1508,11 @@
return obex;
}
+static void tx_queue_free(void *data, void *user_data)
+{
+ pending_pkt_free(data);
+}
+
void g_obex_unref(GObex *obex)
{
int refs;
@@ -1521,7 +1526,7 @@
g_slist_free_full(obex->req_handlers, g_free);
- g_queue_foreach(obex->tx_queue, (GFunc) pending_pkt_free, NULL);
+ g_queue_foreach(obex->tx_queue, tx_queue_free, NULL);
g_queue_free(obex->tx_queue);
if (obex->io != NULL)