[network-manager-vpnc/NETWORKMANAGER_0_7] Fix a bunch of compiler warnings



commit b4ee45bfc24db69c3876a62e21855f4a3c12e993
Author: Michael Biebl <biebl debian org>
Date:   Thu Apr 23 20:14:00 2009 +0200

    Fix a bunch of compiler warnings
---
 auth-dialog/gnome-two-password-dialog.c |    1 -
 auth-dialog/main.c                      |    3 +--
 properties/nm-vpnc.c                    |    2 +-
 properties/tests/test-import-export.c   |    6 ++----
 src/nm-vpnc-service-vpnc-helper.c       |   10 +++++-----
 5 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/auth-dialog/gnome-two-password-dialog.c b/auth-dialog/gnome-two-password-dialog.c
index 9f4c720..1b787eb 100644
--- a/auth-dialog/gnome-two-password-dialog.c
+++ b/auth-dialog/gnome-two-password-dialog.c
@@ -191,7 +191,6 @@ vpn_password_dialog_new (const char *title,
 	GtkWidget *vbox;
 	GtkWidget *main_vbox;
 	GtkWidget *dialog_icon;
-	GSList *group;
 
 	dialog = gtk_widget_new (VPN_TYPE_PASSWORD_DIALOG, NULL);
 	if (!dialog)
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 5d214ee..75ed7b7 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -242,9 +242,8 @@ get_connection_info (const char *vpn_uuid,
                      char **out_upw_type,
                      char **out_gpw_type)
 {
-	char *key, *str;
+	char *key;
 	char *connection_path = NULL;
-	char *upw_type = NULL, *gpw_type = NULL;
 	GConfClient *gconf_client;
 
 	connection_path = find_connection_path (vpn_uuid);
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index 44f0b5d..44a8b8e 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -707,7 +707,7 @@ save_secrets (NMVpnPluginUiWidgetInterface *iface,
 	VpncPluginUiWidget *self = VPNC_PLUGIN_UI_WIDGET (iface);
 	VpncPluginUiWidgetPrivate *priv = VPNC_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
 	NMSettingConnection *s_con;
-	const char *str, *id, *uuid;
+	const char *id, *uuid;
 
 	s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
 	if (!s_con) {
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index 3cefd79..9d0bf97 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -48,13 +48,13 @@ item_count_func (const char *key, const char *value, gpointer user_data)
 }
 
 static void
-test_items (const char *detail, NMSettingVPN *s_vpn, Item *test_items, gboolean secrets)
+test_items (const char *detail, NMSettingVPN *s_vpn, Item *items, gboolean secrets)
 {
 	Item *iter;
 	guint32 expected_count = 0, actual_count = 0;
 	const char *value;
 
-	for (iter = test_items; iter->name; iter++) {
+	for (iter = items; iter->name; iter++) {
 		if (secrets)
 			value = nm_setting_vpn_get_secret (s_vpn, iter->name);
 		else
@@ -141,7 +141,6 @@ test_basic_import (NMVpnPluginUiInterface *plugin, const char *dir)
 	const char *expected_route1_gw = "0.0.0.0";
 	const char *expected_route2_dest = "172.16.0.0";
 	const char *expected_route2_gw = "0.0.0.0";
-	const char *value;
 
 	connection = get_basic_connection ("basic-import", plugin, dir, "basic.pcf");
 	ASSERT (connection != NULL, "basic-import", "failed to import connection");
@@ -311,7 +310,6 @@ test_everything_via_vpn (NMVpnPluginUiInterface *plugin, const char *dir)
 	GError *error = NULL;
 	char *pcf;
 	const char *expected_id = "All your traffic are belong to VPN";
-	const char *value;
 
 	pcf = g_build_path ("/", dir, "everything-via-vpn.pcf", NULL);
 	ASSERT (pcf != NULL,
diff --git a/src/nm-vpnc-service-vpnc-helper.c b/src/nm-vpnc-service-vpnc-helper.c
index 7664cb3..463a4c8 100644
--- a/src/nm-vpnc-service-vpnc-helper.c
+++ b/src/nm-vpnc-service-vpnc-helper.c
@@ -334,13 +334,13 @@ main (int argc, char *argv[])
 	/* Netmask */
 	tmp = getenv ("INTERNAL_IP4_NETMASK");
 	if (tmp && inet_pton (AF_INET, tmp, &temp_addr) > 0) {
-		GValue *val;
+		GValue *value;
 
-		val = g_slice_new0 (GValue);
-		g_value_init (val, G_TYPE_UINT);
-		g_value_set_uint (val, nm_utils_ip4_netmask_to_prefix (temp_addr.s_addr));
+		value = g_slice_new0 (GValue);
+		g_value_init (value, G_TYPE_UINT);
+		g_value_set_uint (value, nm_utils_ip4_netmask_to_prefix (temp_addr.s_addr));
 
-		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, val);
+		g_hash_table_insert (config, NM_VPN_PLUGIN_IP4_CONFIG_PREFIX, value);
 	}
 
 	/* DNS */



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