libnm: cast guint32 argument to guint in variadic g_object_set()

yes, this is not an issue in practice. Variadic arguments are always
propagated to at least int/unsigned type. And kernel and glib both require
sizeof(guint32) <= sizeof(guint). Hence, this was safe on any supported
architecture. Still, let's be explicit about the types.
This commit is contained in:
Thomas Haller 2018-01-17 09:18:39 +01:00
parent 3c6cc7c2e0
commit f2aa286fa9

View file

@ -959,7 +959,7 @@ _normalize_infiniband_mtu (NMConnection *self, GHashTable *parameters)
max_mtu = 65520;
if (max_mtu && nm_setting_infiniband_get_mtu (s_infini) > max_mtu) {
g_object_set (s_infini, NM_SETTING_INFINIBAND_MTU, max_mtu, NULL);
g_object_set (s_infini, NM_SETTING_INFINIBAND_MTU, (guint) max_mtu, NULL);
return TRUE;
}
}