From a6af0ad443ae7cc5cbf4221eaaebc3c92118c25d Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Fri, 24 Jan 2025 18:02:27 +0100 Subject: [PATCH] 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: cf6af54ffa4f ('cloud-setup: allow VETH along with ETHERNET too') Fixes: 6ff4b9e57cbc ('cloud-setup: create VLANs for multiple VNICs on OCI') --- src/nm-cloud-setup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nm-cloud-setup/main.c b/src/nm-cloud-setup/main.c index 0bbf799cdf..199f4e599d 100644 --- a/src/nm-cloud-setup/main.c +++ b/src/nm-cloud-setup/main.c @@ -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) {