mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 17:40:08 +01:00
device: avoid coverity warning about unused variable
This warning is from coverity against 1.18.6. But it applies
in a similar manner here.
1. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: warning: Value stored to 'priv' during its initialization is never read
# NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: note: Value stored to 'priv' during its initialization is never read
# NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 809| {
# 810| NMDeviceMacsec *self = NM_DEVICE_MACSEC (object);
# 811|-> NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
# 812|
# 813| macsec_secrets_cancel (self);
This commit is contained in:
parent
9a7a66b7b2
commit
fdba9200c0
2 changed files with 8 additions and 7 deletions
|
|
@ -863,15 +863,14 @@ static void
|
|||
dispose (GObject *object)
|
||||
{
|
||||
NMDeviceMacsec *self = NM_DEVICE_MACSEC (object);
|
||||
NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self);
|
||||
|
||||
macsec_secrets_cancel (self);
|
||||
supplicant_interface_release (self);
|
||||
|
||||
G_OBJECT_CLASS (nm_device_macsec_parent_class)->dispose (object);
|
||||
|
||||
nm_assert (priv->parent_state_id == 0);
|
||||
nm_assert (priv->parent_mtu_id == 0);
|
||||
nm_assert (NM_DEVICE_MACSEC_GET_PRIVATE (self)->parent_state_id == 0);
|
||||
nm_assert (NM_DEVICE_MACSEC_GET_PRIVATE (self)->parent_mtu_id == 0);
|
||||
}
|
||||
|
||||
static const NMDBusInterfaceInfoExtended interface_info_device_macsec = {
|
||||
|
|
|
|||
|
|
@ -462,16 +462,18 @@ nm_device_macvlan_init (NMDeviceMacvlan *self)
|
|||
{
|
||||
}
|
||||
|
||||
#if NM_MORE_ASSERTS
|
||||
static void
|
||||
dispose (GObject *object)
|
||||
{
|
||||
NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE (object);
|
||||
|
||||
G_OBJECT_CLASS (nm_device_macvlan_parent_class)->dispose (object);
|
||||
|
||||
nm_assert (priv->parent_state_id == 0);
|
||||
nm_assert (priv->parent_mtu_id == 0);
|
||||
nm_assert (NM_DEVICE_MACVLAN_GET_PRIVATE (object)->parent_state_id == 0);
|
||||
nm_assert (NM_DEVICE_MACVLAN_GET_PRIVATE (object)->parent_mtu_id == 0);
|
||||
}
|
||||
#else
|
||||
#define dispose ((void (*) (GObject *object)) NULL)
|
||||
#endif
|
||||
|
||||
static const NMDBusInterfaceInfoExtended interface_info_device_macvlan = {
|
||||
.parent = NM_DEFINE_GDBUS_INTERFACE_INFO_INIT (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue