[libvirt] [PATCH] Fix gcc 4.6 warnings in vbox_tmpl.c
Matthias Bolte
matthias.bolte at googlemail.com
Thu Apr 14 17:28:30 UTC 2011
2011/4/14 Christophe Fergeau <cfergeau at redhat.com>:
> ---
> src/vbox/vbox_tmpl.c | 11 ++++++++---
> 1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
> index 0fbfba5..a7d78df 100644
> --- a/src/vbox/vbox_tmpl.c
> +++ b/src/vbox/vbox_tmpl.c
> @@ -3915,7 +3915,9 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
> PRUnichar *mediumFileUtf16 = NULL;
> PRUint32 storageBus = StorageBus_Null;
> PRUint32 deviceType = DeviceType_Null;
> +# if VBOX_API_VERSION >= 4000
> PRUint32 accessMode = AccessMode_ReadOnly;
> +#endif
> PRInt32 deviceInst = 0;
> PRInt32 devicePort = 0;
> PRInt32 deviceSlot = 0;
> @@ -3924,24 +3926,27 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
>
> if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
> deviceType = DeviceType_HardDisk;
> - accessMode = AccessMode_ReadWrite;
> # if VBOX_API_VERSION < 4000
> data->vboxObj->vtbl->FindHardDisk(data->vboxObj,
> mediumFileUtf16, &medium);
> +#else
This else is not indented properly. make syntax-check should have
caught that if you have cppi installed.
> + accessMode = AccessMode_ReadWrite;
> # endif
ACK.
If fixed the minor indentation errors and pushed the result.
Matthias
More information about the libvir-list
mailing list