The point of this function is to translate virDomainOsDefFirmware enum to qemuFirmwareOSInterface enum. However, with my commit of v5.10.0-507-g8e1804f9f6 we are passing a variable type of virDomainLoader enum. Make the function accept both enums and make the enum members correspond to each other. This fixes clang build. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/conf/domain_conf.h | 4 ++-- src/qemu/qemu_firmware.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index e6b06a8eba..6a61c9603f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1927,8 +1927,8 @@ struct _virDomainOSEnv { typedef enum { VIR_DOMAIN_OS_DEF_FIRMWARE_NONE = 0, - VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS, - VIR_DOMAIN_OS_DEF_FIRMWARE_EFI, + VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS = VIR_DOMAIN_LOADER_TYPE_ROM, + VIR_DOMAIN_OS_DEF_FIRMWARE_EFI = VIR_DOMAIN_LOADER_TYPE_PFLASH, VIR_DOMAIN_OS_DEF_FIRMWARE_LAST } virDomainOsDefFirmware; diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index a835fe6b4a..7fb57913e8 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -929,7 +929,7 @@ qemuFirmwareMatchesMachineArch(const qemuFirmware *fw, static qemuFirmwareOSInterface -qemuFirmwareOSInterfaceTypeFromOsDefFirmware(virDomainOsDefFirmware fw) +qemuFirmwareOSInterfaceTypeFromOsDefFirmware(int fw) { switch (fw) { case VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS: -- 2.24.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list