There are few cases where a function argument is marked as unused, but it's used later in the function. The majority of such occurrences are in vbox_tmpl.c as a residue of older vbox versions, but a pair was found in vbox_common.c too. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/vbox/vbox_common.c | 4 +-- src/vbox/vbox_tmpl.c | 78 +++++++++++++++++++++--------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index bd77641d39..939f9e8fb9 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -64,7 +64,7 @@ static struct _vboxDriver *vboxDriverObjNew(void); static __thread bool vboxDriverDisposed; static int -vboxDomainDevicesDefPostParse(virDomainDeviceDef *dev G_GNUC_UNUSED, +vboxDomainDevicesDefPostParse(virDomainDeviceDef *dev, const virDomainDef *def G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED, @@ -7577,7 +7577,7 @@ vboxNodeGetFreePages(virConnectPtr conn, } static int -vboxNodeAllocPages(virConnectPtr conn G_GNUC_UNUSED, +vboxNodeAllocPages(virConnectPtr conn, unsigned int npages, unsigned int *pageSizes, unsigned long long *pageCounts, diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 52b1c93b6d..967e44fea4 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -495,9 +495,9 @@ static void _DEBUGIID(struct _vboxDriver *data, const char *msg, vboxIID *iid) } static void -_vboxIIDToUtf8(struct _vboxDriver *data G_GNUC_UNUSED, - vboxIID *iid G_GNUC_UNUSED, - char **utf8 G_GNUC_UNUSED) +_vboxIIDToUtf8(struct _vboxDriver *data, + vboxIID *iid, + char **utf8) { data->pFuncs->pfnUtf16ToUtf8(iid->value, utf8); } @@ -543,7 +543,7 @@ static void* _handleSnapshotGetChildren(ISnapshot *snapshot) return snapshot->vtbl->GetChildren; } -static void* _handleMediumGetChildren(IMedium *medium G_GNUC_UNUSED) +static void* _handleMediumGetChildren(IMedium *medium) { return medium->vtbl->GetChildren; } @@ -604,7 +604,7 @@ _virtualboxGetHost(IVirtualBox *vboxObj, IHost **host) } static nsresult -_virtualboxCreateMachine(struct _vboxDriver *data, virDomainDef *def, IMachine **machine, char *uuidstr G_GNUC_UNUSED) +_virtualboxCreateMachine(struct _vboxDriver *data, virDomainDef *def, IMachine **machine, char *uuidstr) { vboxIID iid = VBOX_IID_INITIALIZER; PRUnichar *machineNameUtf16 = NULL; @@ -651,7 +651,7 @@ static nsresult _virtualboxFindHardDisk(IVirtualBox *vboxObj, PRUnichar *location, PRUint32 deviceType, - PRUint32 accessMode G_GNUC_UNUSED, + PRUint32 accessMode, IMedium **medium) { return vboxObj->vtbl->OpenMedium(vboxObj, location, deviceType, accessMode, @@ -726,7 +726,7 @@ _machineAttachDevice(IMachine *machine, static nsresult _machineCreateSharedFolder(IMachine *machine, PRUnichar *name, PRUnichar *hostPath, PRBool writable, - PRBool automount G_GNUC_UNUSED) + PRBool automount) { #if VBOX_API_VERSION >= 6000000 return machine->vtbl->CreateSharedFolder(machine, name, hostPath, @@ -745,7 +745,7 @@ _machineRemoveSharedFolder(IMachine *machine, PRUnichar *name) static nsresult _machineLaunchVMProcess(struct _vboxDriver *data, - IMachine *machine G_GNUC_UNUSED, + IMachine *machine, vboxIID *iid G_GNUC_UNUSED, PRUnichar *sessionType, PRUnichar *env, IProgress **progress) @@ -761,10 +761,10 @@ _machineLaunchVMProcess(struct _vboxDriver *data, } static nsresult -_machineUnregister(IMachine *machine G_GNUC_UNUSED, - PRUint32 cleanupMode G_GNUC_UNUSED, - PRUint32 *aMediaSize G_GNUC_UNUSED, - IMedium ***aMedia G_GNUC_UNUSED) +_machineUnregister(IMachine *machine, + PRUint32 cleanupMode, + PRUint32 *aMediaSize, + IMedium ***aMedia) { return machine->vtbl->Unregister(machine, cleanupMode, aMediaSize, aMedia); } @@ -825,7 +825,7 @@ _machineGetNetworkAdapter(IMachine *machine, PRUint32 slot, INetworkAdapter **ad } static nsresult -_machineGetChipsetType(IMachine *machine G_GNUC_UNUSED, PRUint32 *chipsetType G_GNUC_UNUSED) +_machineGetChipsetType(IMachine *machine, PRUint32 *chipsetType) { return machine->vtbl->GetChipsetType(machine, chipsetType); } @@ -891,13 +891,13 @@ _machineSetMemorySize(IMachine *machine, PRUint32 memorySize) } static nsresult -_machineGetCPUProperty(IMachine *machine, PRUint32 property G_GNUC_UNUSED, PRBool *value) +_machineGetCPUProperty(IMachine *machine, PRUint32 property, PRBool *value) { return machine->vtbl->GetCPUProperty(machine, property, value); } static nsresult -_machineSetCPUProperty(IMachine *machine, PRUint32 property G_GNUC_UNUSED, PRBool value) +_machineSetCPUProperty(IMachine *machine, PRUint32 property, PRBool value) { return machine->vtbl->SetCPUProperty(machine, property, value); } @@ -1228,7 +1228,7 @@ _systemPropertiesGetMaxBootPosition(ISystemProperties *systemProperties, PRUint3 } static nsresult -_systemPropertiesGetMaxNetworkAdapters(ISystemProperties *systemProperties, PRUint32 chipset G_GNUC_UNUSED, +_systemPropertiesGetMaxNetworkAdapters(ISystemProperties *systemProperties, PRUint32 chipset, PRUint32 *maxNetworkAdapters) { return systemProperties->vtbl->GetMaxNetworkAdapters(systemProperties, chipset, @@ -1651,7 +1651,7 @@ _vrdeServerSetAllowMultiConnection(IVRDEServer *VRDEServer, PRBool enabled) } static nsresult -_vrdeServerGetNetAddress(struct _vboxDriver *data G_GNUC_UNUSED, +_vrdeServerGetNetAddress(struct _vboxDriver *data, IVRDEServer *VRDEServer, PRUnichar **netAddress) { PRUnichar *VRDENetAddressKey = NULL; @@ -1665,7 +1665,7 @@ _vrdeServerGetNetAddress(struct _vboxDriver *data G_GNUC_UNUSED, } static nsresult -_vrdeServerSetNetAddress(struct _vboxDriver *data G_GNUC_UNUSED, +_vrdeServerSetNetAddress(struct _vboxDriver *data, IVRDEServer *VRDEServer, PRUnichar *netAddress) { PRUnichar *netAddressKey = NULL; @@ -1774,8 +1774,8 @@ static nsresult _mediumGetSize(IMedium *medium, PRUint64 *uSize) return rc; } -static nsresult _mediumGetReadOnly(IMedium *medium G_GNUC_UNUSED, - PRBool *readOnly G_GNUC_UNUSED) +static nsresult _mediumGetReadOnly(IMedium *medium, + PRBool *readOnly) { return medium->vtbl->GetReadOnly(medium, readOnly); } @@ -1814,18 +1814,18 @@ static nsresult _mediumClose(IMedium *medium) return medium->vtbl->Close(medium); } -static nsresult _mediumSetType(IMedium *medium G_GNUC_UNUSED, - PRUint32 type G_GNUC_UNUSED) +static nsresult _mediumSetType(IMedium *medium, + PRUint32 type) { return medium->vtbl->SetType(medium, type); } static nsresult -_mediumCreateDiffStorage(IMedium *medium G_GNUC_UNUSED, - IMedium *target G_GNUC_UNUSED, - PRUint32 variantSize G_GNUC_UNUSED, - PRUint32 *variant G_GNUC_UNUSED, - IProgress **progress G_GNUC_UNUSED) +_mediumCreateDiffStorage(IMedium *medium, + IMedium *target, + PRUint32 variantSize, + PRUint32 *variant, + IProgress **progress) { return medium->vtbl->CreateDiffStorage(medium, target, variantSize, variant, progress); } @@ -1864,8 +1864,8 @@ _mediumAttachmentGetController(IMediumAttachment *mediumAttachment, } static nsresult -_mediumAttachmentGetType(IMediumAttachment *mediumAttachment G_GNUC_UNUSED, - PRUint32 *type G_GNUC_UNUSED) +_mediumAttachmentGetType(IMediumAttachment *mediumAttachment, + PRUint32 *type) { return mediumAttachment->vtbl->GetType(mediumAttachment, type); } @@ -1961,13 +1961,13 @@ _snapshotGetOnline(ISnapshot *snapshot, PRBool *online) } static nsresult -_displayGetScreenResolution(IDisplay *display G_GNUC_UNUSED, - PRUint32 screenId G_GNUC_UNUSED, - PRUint32 *width G_GNUC_UNUSED, - PRUint32 *height G_GNUC_UNUSED, - PRUint32 *bitsPerPixel G_GNUC_UNUSED, - PRInt32 *xOrigin G_GNUC_UNUSED, - PRInt32 *yOrigin G_GNUC_UNUSED) +_displayGetScreenResolution(IDisplay *display, + PRUint32 screenId, + PRUint32 *width, + PRUint32 *height, + PRUint32 *bitsPerPixel, + PRInt32 *xOrigin, + PRInt32 *yOrigin) { PRUint32 gms; @@ -2023,9 +2023,9 @@ _hostCreateHostOnlyNetworkInterface(struct _vboxDriver *data G_GNUC_UNUSED, } static nsresult -_hostRemoveHostOnlyNetworkInterface(IHost *host G_GNUC_UNUSED, - vboxIID *iid G_GNUC_UNUSED, - IProgress **progress G_GNUC_UNUSED) +_hostRemoveHostOnlyNetworkInterface(IHost *host, + vboxIID *iid, + IProgress **progress) { return host->vtbl->RemoveHostOnlyNetworkInterface(host, iid->value, progress); } -- 2.39.1