gobex: Fix compiler warning from casting functions 94/204994/1
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 23 May 2018 14:32:22 +0000 (16:32 +0200)
committerAmit Purwar <amit.purwar@samsung.com>
Mon, 29 Apr 2019 04:06:41 +0000 (09:36 +0530)
Change-Id: Ia92479c68ee53ffdab6b1e5031311e0a8fee6cab
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
gobex/gobex-packet.c
gobex/gobex.c

index cd5c131..a89f5b6 100755 (executable)
@@ -260,6 +260,11 @@ GObexPacket *g_obex_packet_new(guint8 opcode, gboolean final,
        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 @@ void g_obex_packet_free(GObexPacket *pkt)
                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);
 }
index 84e6100..6229128 100644 (file)
@@ -1513,6 +1513,11 @@ GObex *g_obex_ref(GObex *obex)
        return obex;
 }
 
+static void tx_queue_free(void *data, void *user_data)
+{
+       pending_pkt_free(data);
+}
+
 void g_obex_unref(GObex *obex)
 {
        int refs;
@@ -1526,7 +1531,7 @@ void g_obex_unref(GObex *obex)
 
        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)