Verified Commit 3d274594 authored by Thomas Haller's avatar Thomas Haller

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: 121c58f0 ('core: set number of SR-IOV VFs asynchronously')
(cherry picked from commit 918ebd60)
(cherry picked from commit 32641b9f)
(cherry picked from commit c24888be)
parent 2e0cb189
Pipeline #195795 passed with stage
in 39 minutes and 42 seconds
...@@ -15588,7 +15588,7 @@ sriov_deactivate_cb (GError *error, gpointer user_data) ...@@ -15588,7 +15588,7 @@ sriov_deactivate_cb (GError *error, gpointer user_data)
if (nm_utils_error_is_cancelled (error, TRUE)) if (nm_utils_error_is_cancelled (error, TRUE))
return; return;
deactivate_ready (self, (NMDeviceStateReason) reason); deactivate_ready (self, GPOINTER_TO_INT (reason));
} }
static void static void
...@@ -15896,7 +15896,7 @@ _set_state_full (NMDevice *self, ...@@ -15896,7 +15896,7 @@ _set_state_full (NMDevice *self,
0, 0,
NM_TERNARY_TRUE, NM_TERNARY_TRUE,
sriov_deactivate_cb, sriov_deactivate_cb,
nm_utils_user_data_pack (self, (gpointer) reason)); nm_utils_user_data_pack (self, GINT_TO_POINTER (reason)));
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment