summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-06-06 14:48:48 +0200
committerThomas Haller <thaller@redhat.com>2016-06-06 14:52:11 +0200
commit81ee610888a3c62b8fa1b460616fcc5e7e94276d (patch)
treea89635a8f0fb50b93e9415791b75419bad161dea
parentb0e6dc394b210d3c30cab6cfa94d9f2e6744ac50 (diff)
downloadnetwork-manager-applet-81ee610888a3c62b8fa1b460616fcc5e7e94276d.tar.gz
applet: avoid invalid warning about uninitialized variable in applet_get_active_vpn_connection()
CC nm_applet-applet.o applet.c: In function ‘applet_get_active_vpn_connection’: applet.c:1128:14: error: ‘state’ may be used uninitialized in this function [-Werror=maybe-uninitialized] *out_state = state; ^ applet.c:1099:23: note: ‘state’ was declared here NMVpnConnectionState state; ^ Fixes: c3255ed740592a2f23a7ebc47f1acd2dd2d768b3
-rw-r--r--src/applet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/applet.c b/src/applet.c
index fc878159..b25585ba 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -1096,7 +1096,7 @@ applet_get_active_vpn_connection (NMApplet *applet,
{
const GPtrArray *active_list;
NMActiveConnection *ret = NULL;
- NMVpnConnectionState state;
+ NMVpnConnectionState state = NM_VPN_CONNECTION_STATE_UNKNOWN;
int i;
active_list = nm_client_get_active_connections (applet->nm_client);