mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 12:10:17 +01:00
device: fix casting pointer to enum for sriov_reset_on_deactivate_cb()
Avoids a compiler warning:
../src/devices/nm-device.c:16079:26: error: cast to smaller integer type 'NMDeviceStateReason' from 'gpointer' (aka 'void *') [-Werror,-Wvoid-pointer-to-enum-cast]
deactivate_ready (self, (NMDeviceStateReason) reason);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 121c58f0c4 ('core: set number of SR-IOV VFs asynchronously')
(cherry picked from commit 918ebd600a)
(cherry picked from commit 32641b9fca)
(cherry picked from commit c24888be51)
(cherry picked from commit 3d27459460)
This commit is contained in:
parent
c3aa7285e3
commit
12afddbbca
1 changed files with 2 additions and 2 deletions
|
|
@ -15164,7 +15164,7 @@ sriov_deactivate_cb (GError *error, gpointer user_data)
|
|||
if (nm_utils_error_is_cancelled (error, TRUE))
|
||||
return;
|
||||
|
||||
deactivate_ready (self, (NMDeviceStateReason) reason);
|
||||
deactivate_ready (self, GPOINTER_TO_INT (reason));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -15466,7 +15466,7 @@ _set_state_full (NMDevice *self,
|
|||
0,
|
||||
NM_TERNARY_TRUE,
|
||||
sriov_deactivate_cb,
|
||||
nm_utils_user_data_pack (self, (gpointer) reason));
|
||||
nm_utils_user_data_pack (self, GINT_TO_POINTER (reason)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue