[libsoup] gobject: explicitly cast on g_object_ref/unref() calls



commit 555466d397d24505a6bbfa2bd8da41e47cc8e436
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Mon Dec 11 14:39:47 2017 +0200

    gobject: explicitly cast on g_object_ref/unref() calls
    
    GObject now issues warnings for implicit casts on these being
    called. See https://bugzilla.gnome.org/show_bug.cgi?id=790697.

 libsoup/soup-address.c         |    2 +-
 libsoup/soup-content-sniffer.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libsoup/soup-address.c b/libsoup/soup-address.c
index 650cf81..0351db5 100644
--- a/libsoup/soup-address.c
+++ b/libsoup/soup-address.c
@@ -1246,7 +1246,7 @@ soup_address_connectable_enumerate (GSocketConnectable *connectable)
        SoupAddressPrivate *priv;
 
        addr_enum = g_object_new (SOUP_TYPE_ADDRESS_ADDRESS_ENUMERATOR, NULL);
-       addr_enum->addr = g_object_ref (connectable);
+       addr_enum->addr = g_object_ref (SOUP_ADDRESS (connectable));
 
        priv = soup_address_get_instance_private (addr_enum->addr);
        addr_enum->orig_offset = priv->offset;
diff --git a/libsoup/soup-content-sniffer.c b/libsoup/soup-content-sniffer.c
index 8b4b805..7573fde 100644
--- a/libsoup/soup-content-sniffer.c
+++ b/libsoup/soup-content-sniffer.c
@@ -854,7 +854,7 @@ soup_content_sniffer_request_queued (SoupSessionFeature *feature,
 {
        SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg);
 
-       priv->sniffer = g_object_ref (feature);
+       priv->sniffer = g_object_ref (SOUP_CONTENT_SNIFFER (feature));
        g_signal_connect (msg, "got-headers",
                          G_CALLBACK (soup_content_sniffer_got_headers_cb),
                          feature);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]