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')
This commit is contained in:
Thomas Haller 2020-08-28 12:35:43 +02:00
parent 818d146d88
commit 918ebd600a
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

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