summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-08-28 12:35:43 +0200
committerThomas Haller <thaller@redhat.com>2020-08-28 12:39:56 +0200
commit918ebd600acba97ea64af7d1039339983fa44af4 (patch)
tree24e89bd0c1433ba6b38d5c1e711ddd39156a1559
parent818d146d88e700569963a31838917ba8ec88bd00 (diff)
downloadNetworkManager-918ebd600acba97ea64af7d1039339983fa44af4.tar.gz
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: 121c58f0c48d ('core: set number of SR-IOV VFs asynchronously')
-rw-r--r--src/devices/nm-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index c1c2774d6a..5860eec9c4 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -16076,7 +16076,7 @@ sriov_reset_on_deactivate_cb (GError *error, gpointer user_data)
if (nm_utils_error_is_cancelled (error))
return;
- deactivate_ready (self, (NMDeviceStateReason) reason);
+ deactivate_ready (self, GPOINTER_TO_INT (reason));
}
static void
@@ -16429,7 +16429,7 @@ _set_state_full (NMDevice *self,
0,
NM_TERNARY_TRUE,
sriov_reset_on_deactivate_cb,
- nm_utils_user_data_pack (self, (gpointer) reason));
+ nm_utils_user_data_pack (self, GINT_TO_POINTER (reason)));
}
}