[network-manager-openconnect/NETWORKMANAGER_0_7] Fix a bunch of compiler warnings
- From: Michael Biebl <mbiebl src gnome org>
- To: svn-commits-list gnome org
- Subject: [network-manager-openconnect/NETWORKMANAGER_0_7] Fix a bunch of compiler warnings
- Date: Thu, 30 Apr 2009 06:32:23 -0400 (EDT)
commit cdc6411c9bdd8dd7134e261281a359563c8cece9
Author: Michael Biebl <biebl debian org>
Date: Thu Apr 23 19:38:28 2009 +0200
Fix a bunch of compiler warnings
---
properties/auth-helpers.c | 6 ++----
properties/nm-openconnect.c | 6 +-----
src/nm-openconnect-service-openconnect-helper.c | 10 +++++-----
src/nm-openconnect-service.c | 8 ++++----
4 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 3cbd896..6e162c1 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -188,8 +188,10 @@ validate_tls (GladeXML *xml, const char *prefix, GError **error)
gboolean
auth_widget_check_validity (GladeXML *xml, const char *contype, GError **error)
{
+#if 0
GtkWidget *widget;
const char *str;
+#endif
if (!strcmp (contype, NM_OPENCONNECT_AUTHTYPE_CERT) ||
!strcmp (contype, NM_OPENCONNECT_AUTHTYPE_CERT_TPM)) {
@@ -284,10 +286,6 @@ auth_widget_update_connection (GladeXML *xml,
const char *contype,
NMSettingVPN *s_vpn)
{
- GtkTreeModel *model;
- GtkTreeIter iter;
- GtkWidget *widget;
-
if (!strcmp (contype, NM_OPENCONNECT_AUTHTYPE_CERT) ||
!strcmp (contype, NM_OPENCONNECT_AUTHTYPE_CERT_TPM)) {
update_tls (xml, "cert", s_vpn);
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 30cd4c2..03801ea 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -286,7 +286,6 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
char *str;
GtkTreeModel *model;
GtkTreeIter iter;
- gboolean valid = FALSE;
const char *auth_type = NULL;
if (!check_validity (self, error))
@@ -310,10 +309,7 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
}
nm_connection_add_setting (connection, NM_SETTING (s_vpn));
- valid = TRUE;
-
-done:
- return valid;
+ return TRUE;
}
static gboolean
diff --git a/src/nm-openconnect-service-openconnect-helper.c b/src/nm-openconnect-service-openconnect-helper.c
index 231e61d..b2bf701 100644
--- a/src/nm-openconnect-service-openconnect-helper.c
+++ b/src/nm-openconnect-service-openconnect-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 */
diff --git a/src/nm-openconnect-service.c b/src/nm-openconnect-service.c
index b9803b2..1eae138 100644
--- a/src/nm-openconnect-service.c
+++ b/src/nm-openconnect-service.c
@@ -337,8 +337,6 @@ real_connect (NMVPNPlugin *plugin,
{
NMSettingVPN *s_vpn;
gint openconnect_fd = -1;
- gboolean success = FALSE;
- GHashTable *secrets;
s_vpn = NM_SETTING_VPN (nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN));
g_assert (s_vpn);
@@ -453,7 +451,8 @@ quit_mainloop (NMOPENCONNECTPlugin *plugin, gpointer user_data)
g_main_loop_quit ((GMainLoop *) user_data);
}
-void create_persistent_tundev(void)
+static void
+create_persistent_tundev(void)
{
struct passwd *pw;
struct ifreq ifr;
@@ -501,7 +500,8 @@ void create_persistent_tundev(void)
close(fd);
}
-void destroy_persistent_tundev(void)
+static void
+destroy_persistent_tundev(void)
{
struct ifreq ifr;
int fd;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]