From: Colin Walters Date: Fri, 14 Dec 2012 21:02:48 +0000 (-0500) Subject: SoupConnection: Quiet a (mistaken) compiler warning X-Git-Tag: 2.41.3~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a40d1188d34eee3a5ae55869e09aac0c97b6443;p=platform%2Fupstream%2Flibsoup.git 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 --- diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index 34b9b2d..2161394 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -604,7 +604,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; @@ -690,7 +690,7 @@ soup_connection_connect_sync (SoupConnection *conn, GCancellable *cancellable) soup_connection_disconnect (conn); } - if (priv->socket) + if (priv->socket && event_id) g_signal_handler_disconnect (priv->socket, event_id); if (priv->proxy_uri != NULL)