cloud-setup: avoid accidental cast into a smaller type

This resulted in what looked like more significant bits of GType pointer
sometimes falling off the cliff, presumably because of a cast to
NMDeviceType enum (that probably ends up actually being a char).

This was silent enough to not emit compiler warnings and only occurring
with some very rare situations (needs GCC with LTO and some of the
optimization flags used by Fedora 41).

Fixes: cf6af54ffa ('cloud-setup: allow VETH along with ETHERNET too')
Fixes: 6ff4b9e57c ('cloud-setup: create VLANs for multiple VNICs on OCI')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2119
This commit is contained in:
Lubomir Rintel 2025-01-24 18:02:27 +01:00
parent cc4a0a9f10
commit 49e7db7047

View file

@ -833,7 +833,7 @@ _oci_config_vnic_dev(SigTermData *sigterm_data,
const NMCSProviderGetConfigIfaceData *config_data,
NMClient *nmc,
const NMCSProviderGetConfigResult *result,
NMDeviceType device_type,
const GType device_type,
const char *connection_type,
const char *parent_hwaddr)
{