cloud-setup: fix format string

On a i686 machine the build fails with:

../src/nm-cloud-setup/main.c: In function ‘_oci_new_vlan_dev’:
../src/nm-cloud-setup/main.c:800:47: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘gssize’ {aka ‘int’} [-Werror=format=]
  800 |     macvlan_name  = g_strdup_printf("macvlan%ld", config_data->iface_idx);
      |                                             ~~^   ~~~~~~~~~~~~~~~~~~~~~~
      |                                               |              |
      |                                               long int       gssize {aka int}
      |                                             %d
../src/nm-cloud-setup/main.c:801:42: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘gssize’ {aka ‘int’} [-Werror=format=]
  801 |     connection_id = g_strdup_printf("%s%ld", connection_type, config_data->iface_idx);
      |                                        ~~^                    ~~~~~~~~~~~~~~~~~~~~~~
      |                                          |                               |
      |                                          long int                        gssize {aka int}
      |                                        %d

Fixes: 68d7e17737 ('Reapply "cloud-setup: create VLANs for multiple VNICs on OCI"')
This commit is contained in:
Beniamino Galvani 2026-01-09 16:03:03 +01:00
parent dcaedcee9b
commit 6b95095b4c

View file

@ -797,8 +797,8 @@ _oci_new_vlan_dev(SigTermData *sigterm_data,
connection = _new_connection();
macvlan_name = g_strdup_printf("macvlan%ld", config_data->iface_idx);
connection_id = g_strdup_printf("%s%ld", connection_type, config_data->iface_idx);
macvlan_name = g_strdup_printf("macvlan%" G_GSSIZE_FORMAT, config_data->iface_idx);
connection_id = g_strdup_printf("%s%" G_GSSIZE_FORMAT, connection_type, config_data->iface_idx);
wired_mac_addr = parent_hwaddr;
if (nm_streq(connection_type, NM_SETTING_MACVLAN_SETTING_NAME)) {