[network-manager-applet/rm-userset] trivial: more gcc warning shut-up



commit b690fddefa1aa02a04cafba552432aea7831ff5a
Author: Dan Williams <dcbw redhat com>
Date:   Thu Jan 27 10:55:42 2011 -0600

    trivial: more gcc warning shut-up

 src/connection-editor/page-ip4.c                |   14 ++++----------
 src/connection-editor/page-ip6.c                |   12 +++---------
 src/connection-editor/ppp-auth-methods-dialog.c |   12 ++++++------
 3 files changed, 13 insertions(+), 25 deletions(-)
---
diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c
index 6492366..0e15866 100644
--- a/src/connection-editor/page-ip4.c
+++ b/src/connection-editor/page-ip4.c
@@ -363,7 +363,6 @@ populate_ui (CEPageIP4 *self)
 		NMIP4Address *addr = nm_setting_ip4_config_get_address (setting, i);
 		struct in_addr tmp_addr;
 		char buf[INET_ADDRSTRLEN + 1];
-		const char *ignored;
 
 		if (!addr) {
 			g_warning ("%s: empty IP4 Address structure!", __func__);
@@ -373,15 +372,15 @@ populate_ui (CEPageIP4 *self)
 		gtk_list_store_append (store, &model_iter);
 
 		tmp_addr.s_addr = nm_ip4_address_get_address (addr);
-		ignored = inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
+		(void) inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
 		gtk_list_store_set (store, &model_iter, COL_ADDRESS, buf, -1);
 
 		tmp_addr.s_addr = nm_utils_ip4_prefix_to_netmask (nm_ip4_address_get_prefix (addr));
-		ignored = inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
+		(void) inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
 		gtk_list_store_set (store, &model_iter, COL_PREFIX, buf, -1);
 
 		tmp_addr.s_addr = nm_ip4_address_get_gateway (addr);
-		ignored = inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
+		(void) inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
 		gtk_list_store_set (store, &model_iter, COL_GATEWAY, buf, -1);
 	}
 
@@ -395,13 +394,12 @@ populate_ui (CEPageIP4 *self)
 	for (i = 0; i < nm_setting_ip4_config_get_num_dns (setting); i++) {
 		struct in_addr tmp_addr;
 		char buf[INET_ADDRSTRLEN + 1];
-		const char *ignored;
 
 		tmp_addr.s_addr = nm_setting_ip4_config_get_dns (setting, i);
 		if (!tmp_addr.s_addr)
 			continue;
 
-		ignored = inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
+		(void) inet_ntop (AF_INET, &tmp_addr, &buf[0], sizeof (buf));
 		if (string->len)
 			g_string_append (string, ", ");
 		g_string_append (string, buf);
@@ -715,16 +713,12 @@ finish_setup (CEPageIP4 *self, gpointer unused, GError *error, gpointer user_dat
 	gint offset;
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *renderer;
-	GtkListStore *store;
 
 	if (error)
 		return;
 
 	populate_ui (self);
 
-	/* Address column */
-	store = GTK_LIST_STORE (gtk_tree_view_get_model (priv->addr_list));
-
 	/* IP Address column */
 	renderer = gtk_cell_renderer_text_new ();
 	g_object_set (renderer, "editable", TRUE, NULL);
diff --git a/src/connection-editor/page-ip6.c b/src/connection-editor/page-ip6.c
index 320199c..6243aaf 100644
--- a/src/connection-editor/page-ip6.c
+++ b/src/connection-editor/page-ip6.c
@@ -359,7 +359,6 @@ populate_ui (CEPageIP6 *self)
 		NMIP6Address *addr = nm_setting_ip6_config_get_address (setting, i);
 		const struct in6_addr *tmp_addr;
 		char buf[INET6_ADDRSTRLEN + 1];
-		const char *ignored;
 
 		if (!addr) {
 			g_warning ("%s: empty IP6 Address structure!", __func__);
@@ -370,7 +369,7 @@ populate_ui (CEPageIP6 *self)
 
 		/* Address */
 		tmp_addr = nm_ip6_address_get_address (addr);
-		ignored = inet_ntop (AF_INET6, tmp_addr, &buf[0], sizeof (buf));
+		(void) inet_ntop (AF_INET6, tmp_addr, &buf[0], sizeof (buf));
 		gtk_list_store_set (store, &model_iter, COL_ADDRESS, buf, -1);
 
 		/* Prefix */
@@ -380,7 +379,7 @@ populate_ui (CEPageIP6 *self)
 		/* Gateway */
 		tmp_addr = nm_ip6_address_get_gateway (addr);
 		if (tmp_addr && !IN6_IS_ADDR_UNSPECIFIED (tmp_addr)) {
-			ignored = inet_ntop (AF_INET6, tmp_addr, &buf[0], sizeof (buf));
+			(void) inet_ntop (AF_INET6, tmp_addr, &buf[0], sizeof (buf));
 			gtk_list_store_set (store, &model_iter, COL_GATEWAY, buf, -1);
 		}
 	}
@@ -395,13 +394,12 @@ populate_ui (CEPageIP6 *self)
 	for (i = 0; i < nm_setting_ip6_config_get_num_dns (setting); i++) {
 		const struct in6_addr *tmp_addr;
 		char buf[INET6_ADDRSTRLEN + 1];
-		const char *ignored;
 
 		tmp_addr = nm_setting_ip6_config_get_dns (setting, i);
 		if (!tmp_addr)
 			continue;
 
-		ignored = inet_ntop (AF_INET6, tmp_addr, &buf[0], sizeof (buf));
+		(void) inet_ntop (AF_INET6, tmp_addr, &buf[0], sizeof (buf));
 		if (string->len)
 			g_string_append (string, ", ");
 		g_string_append (string, buf);
@@ -700,16 +698,12 @@ finish_setup (CEPageIP6 *self, gpointer unused, GError *error, gpointer user_dat
 	gint offset;
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *renderer;
-	GtkListStore *store;
 
 	if (error)
 		return;
 
 	populate_ui (self);
 
-	/* Address column */
-	store = GTK_LIST_STORE (gtk_tree_view_get_model (priv->addr_list));
-
 	/* IP Address column */
 	renderer = gtk_cell_renderer_text_new ();
 	g_object_set (renderer, "editable", TRUE, NULL);
diff --git a/src/connection-editor/ppp-auth-methods-dialog.c b/src/connection-editor/ppp-auth-methods-dialog.c
index a6e4880..c9dd51f 100644
--- a/src/connection-editor/ppp-auth-methods-dialog.c
+++ b/src/connection-editor/ppp-auth-methods-dialog.c
@@ -63,12 +63,12 @@ validate (GtkWidget *dialog)
 	allow_mschapv2 = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "ok_button"));
-#if 0
-/* Ignore for now until we know whether any PPP servers simply don't request
- * authentication at all.
- */
-	gtk_widget_set_sensitive (widget, (allow_eap || allow_pap || allow_chap || allow_mschap || allow_mschapv2));
-#endif
+
+	/* Ignore for now until we know whether any PPP servers simply don't request
+	 * authentication at all.
+	 */
+	if (0)
+		gtk_widget_set_sensitive (widget, (allow_eap || allow_pap || allow_chap || allow_mschap || allow_mschapv2));
 }
 
 GtkWidget *



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