summaryrefslogtreecommitdiff
path: root/src/nm-firewall-manager.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-05-10 13:45:50 +0200
committerThomas Haller <thaller@redhat.com>2017-05-10 13:55:33 +0200
commit89af3b3e343fe73b44c88243dd71eae5fd16ceaf (patch)
tree09f177cbc3aa84d3194b5ce7a2729521eba67156 /src/nm-firewall-manager.c
parent4d47d5bf518ff498070928c74b6e44ab1746f01f (diff)
downloadNetworkManager-89af3b3e343fe73b44c88243dd71eae5fd16ceaf.tar.gz
firewall: avoid invalid -Werror=maybe-uninitialized warning in _handle_dbus_start()
../../src/nm-firewall-manager.c: In function ‘_handle_dbus_start’: ../../src/nm-firewall-manager.c:318:2: error: ‘dbus_method’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g_dbus_proxy_call (priv->proxy, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dbus_method, ~~~~~~~~~~~~ arg, ~~~~ Fixes: d8bf05d3e695f043eeb0fac4646fc6babad1bee3 (cherry picked from commit 3ba614d6963fb7d21b93f591ae60ec2a06a8e281)
Diffstat (limited to 'src/nm-firewall-manager.c')
-rw-r--r--src/nm-firewall-manager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nm-firewall-manager.c b/src/nm-firewall-manager.c
index 0d893652f8..4a887b7994 100644
--- a/src/nm-firewall-manager.c
+++ b/src/nm-firewall-manager.c
@@ -285,7 +285,7 @@ _handle_dbus_start (NMFirewallManager *self,
CBInfo *info)
{
NMFirewallManagerPrivate *priv = NM_FIREWALL_MANAGER_GET_PRIVATE (self);
- const char *dbus_method;
+ const char *dbus_method = NULL;
GVariant *arg;
nm_assert (info);
@@ -302,10 +302,8 @@ _handle_dbus_start (NMFirewallManager *self,
case CB_INFO_OPS_REMOVE:
dbus_method = "removeInterface";
break;
- default:
- nm_assert_not_reached ();
- break;
}
+ nm_assert (dbus_method);
arg = info->dbus.arg;
info->dbus.arg = NULL;