[libsoup/gnome-3-6] SoupConnection: Quiet a (mistaken) compiler warning



commit c55493c00f02d89d3ee74fadae232195dd60b2cd
Author: Colin Walters <walters verbum org>
Date:   Fri Dec 14 16:02:48 2012 -0500

    SoupConnection: Quiet a (mistaken) compiler warning
    
    gcc claims 'event_id' might be uninitialized; it's wrong, but it's
    hard for the optimizer to know that.  Placate it in the name of
    reducing warnings.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690224

 libsoup/soup-connection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c
index 1889a94..3572012 100644
--- a/libsoup/soup-connection.c
+++ b/libsoup/soup-connection.c
@@ -600,7 +600,7 @@ guint
 soup_connection_connect_sync (SoupConnection *conn, GCancellable *cancellable)
 {
 	SoupConnectionPrivate *priv;
-	guint status, event_id;
+	guint status, event_id = 0;
 	SoupURI *connect_uri;
 	SoupAddress *remote_addr;
 
@@ -688,7 +688,7 @@ soup_connection_connect_sync (SoupConnection *conn, GCancellable *cancellable)
 		}
 	}
 
-	if (priv->socket)
+	if (priv->socket && event_id)
 		g_signal_handler_disconnect (priv->socket, event_id);
 
 	if (priv->proxy_uri != NULL)



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