From nobody Sun Feb 8 23:37:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1674466474; cv=none; d=zohomail.com; s=zohoarc; b=OlQxsQNKyNPi6LUP9pSqLxasZlsF9pmaJfsz6AFHEg9AiEet5nGDvDUjPIN6lleyqJvjrAES60YOhfg9cg2TeXa2nyaOVHM9E9sIbmuARmdT+5bfpUO1FYOifM62qMknrLo+VTGNBCdDnsAdFpBlvUBxv8bHE5SoYArlS/9Zlh8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674466474; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pZ9hDHDULzOI8Fodiecj2GayMkGTK6pWgU3MhZxNZwo=; b=fXzyNb6P9pG4o0uJrrMD3A2Khn4V2vbViELduGXx2CTVfilSFBZHyS9BlssJ2l2K4zJgxM8XSk+gdwVobdeAgeLNYZj4VIx6uN0LFiwAkpVdg2MjnN06GH7dXkTuxTENPWJ5+XCy8+FzHUkKrsR2NLUrU/RUVi1epn9uY4N2nWI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1674466474204220.51017961676996; Mon, 23 Jan 2023 01:34:34 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-397-Mw2QJZ2dMae5WsU_mf9IPQ-1; Mon, 23 Jan 2023 04:34:29 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E32F101A55E; Mon, 23 Jan 2023 09:34:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19FF6C15BA0; Mon, 23 Jan 2023 09:34:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0950D194658C; Mon, 23 Jan 2023 09:34:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 933641946589 for ; Mon, 23 Jan 2023 09:34:26 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 78D861121333; Mon, 23 Jan 2023 09:34:26 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 045941121330 for ; Mon, 23 Jan 2023 09:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674466473; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=pZ9hDHDULzOI8Fodiecj2GayMkGTK6pWgU3MhZxNZwo=; b=hof1C6yR2PnVeNX0r8ILMdnufVEEYw9isQ+xOSYIFz4kt92bxMpKkp0Y09OWicAY6gVY8G v/Z/7+hXTpJnkOm1vvbNQHt+2UyUQUzV4EB5XyHRsVVHGYdgIIiZI4Eibp0fqxz7EA5aim pYztNNOdOSTlEd2ZpF2a3qLA/MWlxh0= X-MC-Unique: Mw2QJZ2dMae5WsU_mf9IPQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 01/15] vbox: Drop misleading G_GNUC_UNUSED annotation Date: Mon, 23 Jan 2023 10:34:10 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674466475329100001 Content-Type: text/plain; charset="utf-8"; x-default="true" 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 --- 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; =20 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, } =20 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 c= har *msg, vboxIID *iid) } =20 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 *snap= shot) return snapshot->vtbl->GetChildren; } =20 -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) } =20 static nsresult -_virtualboxCreateMachine(struct _vboxDriver *data, virDomainDef *def, IMac= hine **machine, char *uuidstr G_GNUC_UNUSED) +_virtualboxCreateMachine(struct _vboxDriver *data, virDomainDef *def, IMac= hine **machine, char *uuidstr) { vboxIID iid =3D VBOX_IID_INITIALIZER; PRUnichar *machineNameUtf16 =3D 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, access= Mode, @@ -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 >=3D 6000000 return machine->vtbl->CreateSharedFolder(machine, name, hostPath, @@ -745,7 +745,7 @@ _machineRemoveSharedFolder(IMachine *machine, PRUnichar= *name) =20 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, } =20 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, aMe= dia); } @@ -825,7 +825,7 @@ _machineGetNetworkAdapter(IMachine *machine, PRUint32 s= lot, INetworkAdapter **ad } =20 static nsresult -_machineGetChipsetType(IMachine *machine G_GNUC_UNUSED, PRUint32 *chipsetT= ype G_GNUC_UNUSED) +_machineGetChipsetType(IMachine *machine, PRUint32 *chipsetType) { return machine->vtbl->GetChipsetType(machine, chipsetType); } @@ -891,13 +891,13 @@ _machineSetMemorySize(IMachine *machine, PRUint32 mem= orySize) } =20 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); } =20 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 } =20 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 *VRDES= erver, PRBool enabled) } =20 static nsresult -_vrdeServerGetNetAddress(struct _vboxDriver *data G_GNUC_UNUSED, +_vrdeServerGetNetAddress(struct _vboxDriver *data, IVRDEServer *VRDEServer, PRUnichar **netAddress) { PRUnichar *VRDENetAddressKey =3D NULL; @@ -1665,7 +1665,7 @@ _vrdeServerGetNetAddress(struct _vboxDriver *data G_G= NUC_UNUSED, } =20 static nsresult -_vrdeServerSetNetAddress(struct _vboxDriver *data G_GNUC_UNUSED, +_vrdeServerSetNetAddress(struct _vboxDriver *data, IVRDEServer *VRDEServer, PRUnichar *netAddress) { PRUnichar *netAddressKey =3D NULL; @@ -1774,8 +1774,8 @@ static nsresult _mediumGetSize(IMedium *medium, PRUin= t64 *uSize) return rc; } =20 -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); } =20 -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); } =20 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, va= riant, progress); } @@ -1864,8 +1864,8 @@ _mediumAttachmentGetController(IMediumAttachment *med= iumAttachment, } =20 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 *onl= ine) } =20 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; =20 @@ -2023,9 +2023,9 @@ _hostCreateHostOnlyNetworkInterface(struct _vboxDrive= r *data G_GNUC_UNUSED, } =20 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, pr= ogress); } --=20 2.39.1