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: d8bf05d3e6
(cherry picked from commit 3ba614d696)
This commit is contained in:
Thomas Haller 2017-05-10 13:45:50 +02:00
parent 4d47d5bf51
commit 89af3b3e34

View file

@ -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;