From nobody Sun Feb 8 16:05:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1571059031; cv=none; d=zoho.com; s=zohoarc; b=na8ImVQM0rNTp1pmaRVIuqes5NtIkLs8bHMhc54NrDTihAhkdfBIicHGiccNNj3iDFqx2TIKIR/O0t9YoHzerQDqU4yDFQUW07Sz2CWNLLYmccDdRWUDWigxIo6q/kMqE3bZSqAn/ap8gEJKAUdjl48OZHEaRWoucnKRjZFXAXo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571059031; 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=i1rmabiwLH1CMkSYBYCrJl8vrigLafhLmGuF3vpoRwo=; b=ee6Lg+eHWDMsTV4nlZ+tsuEcF7PCosXs4nWWBj7jS/O0DB9P6LBTYv1DUPaUDb35UhLNDJ5siW7Kca+LhWUftqdes0FFTNH4Hi74KGWYPF214jUTnpFqi+xRnqhduPP0TBHLXalowi8rRbfXMLENOadthOOzRt1vzgG86rawLQ4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571059031870196.96656827058632; Mon, 14 Oct 2019 06:17:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B276D18CB901; Mon, 14 Oct 2019 13:17:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 868851001DC0; Mon, 14 Oct 2019 13:17:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 441AE180BA9D; Mon, 14 Oct 2019 13:17:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9EDGO1u017415 for ; Mon, 14 Oct 2019 09:16:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9AD5060127; Mon, 14 Oct 2019 13:16:24 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 232C560126 for ; Mon, 14 Oct 2019 13:16:23 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 14 Oct 2019 15:15:31 +0200 Message-Id: <0fe99098cb47f6de397e357a324b4ec5e5c9432c.1571058852.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/35] libxl: use G_GNUC_UNUSED X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Mon, 14 Oct 2019 13:17:10 +0000 (UTC) Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED. Signed-off-by: J=C3=A1n Tomko --- src/libxl/libxl_conf.h | 2 +- src/libxl/libxl_domain.c | 26 +++++++------- src/libxl/libxl_driver.c | 70 ++++++++++++++++++------------------- src/libxl/libxl_logger.c | 14 ++++---- src/libxl/libxl_migration.c | 12 +++---- 5 files changed, 62 insertions(+), 62 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 80be791b7c..305c8c41ef 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -212,7 +212,7 @@ libxlCreateXMLConf(void); #ifdef LIBXL_HAVE_DEVICE_CHANNEL # define LIBXL_ATTR_UNUSED #else -# define LIBXL_ATTR_UNUSED ATTRIBUTE_UNUSED +# define LIBXL_ATTR_UNUSED G_GNUC_UNUSED #endif int libxlBuildDomainConfig(virPortAllocatorRangePtr graphicsports, diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 4073bf8d46..1e4d900ac5 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -108,7 +108,7 @@ libxlDomainObjFreeJob(libxlDomainObjPrivatePtr priv) * successful calls must be followed by EndJob eventually */ int -libxlDomainObjBeginJob(libxlDriverPrivatePtr driver ATTRIBUTE_UNUSED, +libxlDomainObjBeginJob(libxlDriverPrivatePtr driver G_GNUC_UNUSED, virDomainObjPtr obj, enum libxlDomainJob job) { @@ -166,7 +166,7 @@ libxlDomainObjBeginJob(libxlDriverPrivatePtr driver ATT= RIBUTE_UNUSED, * and obj is disposed. */ void -libxlDomainObjEndJob(libxlDriverPrivatePtr driver ATTRIBUTE_UNUSED, +libxlDomainObjEndJob(libxlDriverPrivatePtr driver G_GNUC_UNUSED, virDomainObjPtr obj) { libxlDomainObjPrivatePtr priv =3D obj->privateData; @@ -201,7 +201,7 @@ libxlDomainJobUpdateTime(struct libxlDomainJobObj *job) } =20 static void * -libxlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED) +libxlDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED) { libxlDomainObjPrivatePtr priv; =20 @@ -246,7 +246,7 @@ libxlDomainObjPrivateFree(void *data) static int libxlDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, virDomainObjPtr vm, - virDomainDefParserConfigPtr config ATTRIBUTE= _UNUSED) + virDomainDefParserConfigPtr config G_GNUC_UN= USED) { libxlDomainObjPrivatePtr priv =3D vm->privateData; =20 @@ -278,10 +278,10 @@ virDomainXMLPrivateDataCallbacks libxlDomainXMLPrivat= eDataCallbacks =3D { static int libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, const virDomainDef *def, - virCapsPtr caps ATTRIBUTE_UNUSED, - unsigned int parseFlags ATTRIBUTE_UNUSED, - void *opaque ATTRIBUTE_UNUSED, - void *parseOpaque ATTRIBUTE_UNUSED) + virCapsPtr caps G_GNUC_UNUSED, + unsigned int parseFlags G_GNUC_UNUSED, + void *opaque G_GNUC_UNUSED, + void *parseOpaque G_GNUC_UNUSED) { if (dev->type =3D=3D VIR_DOMAIN_DEVICE_CHR && dev->data.chr->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOL= E && @@ -367,10 +367,10 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr d= ev, =20 static int libxlDomainDefPostParse(virDomainDefPtr def, - virCapsPtr caps ATTRIBUTE_UNUSED, - unsigned int parseFlags ATTRIBUTE_UNUSED, - void *opaque ATTRIBUTE_UNUSED, - void *parseOpaque ATTRIBUTE_UNUSED) + virCapsPtr caps G_GNUC_UNUSED, + unsigned int parseFlags G_GNUC_UNUSED, + void *opaque G_GNUC_UNUSED, + void *parseOpaque G_GNUC_UNUSED) { /* Xen PV domains always have a PV console, so add one to the domain c= onfig * via post-parse callback if not explicitly specified in the XML. */ @@ -1255,7 +1255,7 @@ libxlDomainCreateChannelPTY(virDomainDefPtr def, libx= l_ctx *ctx) #ifdef LIBXL_HAVE_SRM_V2 # define LIBXL_DOMSTART_RESTORE_VER_ATTR /* empty */ #else -# define LIBXL_DOMSTART_RESTORE_VER_ATTR ATTRIBUTE_UNUSED +# define LIBXL_DOMSTART_RESTORE_VER_ATTR G_GNUC_UNUSED #endif =20 /* diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index ea643b8a3f..7153a82e20 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -131,7 +131,7 @@ libxlOSEventHookInfoFree(void *obj) } =20 static void -libxlFDEventCallback(int watch ATTRIBUTE_UNUSED, +libxlFDEventCallback(int watch G_GNUC_UNUSED, int fd, int vir_events, void *fd_info) @@ -185,8 +185,8 @@ libxlFDRegisterEventHook(void *priv, } =20 static int -libxlFDModifyEventHook(void *priv ATTRIBUTE_UNUSED, - int fd ATTRIBUTE_UNUSED, +libxlFDModifyEventHook(void *priv G_GNUC_UNUSED, + int fd G_GNUC_UNUSED, void **hndp, short events) { @@ -204,8 +204,8 @@ libxlFDModifyEventHook(void *priv ATTRIBUTE_UNUSED, } =20 static void -libxlFDDeregisterEventHook(void *priv ATTRIBUTE_UNUSED, - int fd ATTRIBUTE_UNUSED, +libxlFDDeregisterEventHook(void *priv G_GNUC_UNUSED, + int fd G_GNUC_UNUSED, void *hnd) { libxlOSEventHookInfoPtr info =3D hnd; @@ -214,7 +214,7 @@ libxlFDDeregisterEventHook(void *priv ATTRIBUTE_UNUSED, } =20 static void -libxlTimerCallback(int timer ATTRIBUTE_UNUSED, void *timer_info) +libxlTimerCallback(int timer G_GNUC_UNUSED, void *timer_info) { libxlOSEventHookInfoPtr info =3D timer_info; =20 @@ -280,9 +280,9 @@ libxlTimeoutRegisterEventHook(void *priv, * 2. Timeout deregister hooks will no longer be called. */ static int -libxlTimeoutModifyEventHook(void *priv ATTRIBUTE_UNUSED, +libxlTimeoutModifyEventHook(void *priv G_GNUC_UNUSED, void **hndp, - struct timeval abs_t ATTRIBUTE_UNUSED) + struct timeval abs_t G_GNUC_UNUSED) { libxlOSEventHookInfoPtr info =3D *hndp; =20 @@ -293,7 +293,7 @@ libxlTimeoutModifyEventHook(void *priv ATTRIBUTE_UNUSED, } =20 static void -libxlTimeoutDeregisterEventHook(void *priv ATTRIBUTE_UNUSED, +libxlTimeoutDeregisterEventHook(void *priv G_GNUC_UNUSED, void *hnd) { libxlOSEventHookInfoPtr info =3D hnd; @@ -649,8 +649,8 @@ libxlAddDom0(libxlDriverPrivatePtr driver) =20 static int libxlStateInitialize(bool privileged, - virStateInhibitCallback callback ATTRIBUTE_UNUSED, - void *opaque ATTRIBUTE_UNUSED) + virStateInhibitCallback callback G_GNUC_UNUSED, + void *opaque G_GNUC_UNUSED) { libxlDriverConfigPtr cfg; char *driverConf =3D NULL; @@ -861,8 +861,8 @@ libxlConnectURIProbe(char **uri) =20 static virDrvOpenStatus libxlConnectOpen(virConnectPtr conn, - virConnectAuthPtr auth ATTRIBUTE_UNUSED, - virConfPtr conf ATTRIBUTE_UNUSED, + virConnectAuthPtr auth G_GNUC_UNUSED, + virConfPtr conf G_GNUC_UNUSED, unsigned int flags) { virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); @@ -893,7 +893,7 @@ libxlConnectOpen(virConnectPtr conn, }; =20 static int -libxlConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED) +libxlConnectClose(virConnectPtr conn G_GNUC_UNUSED) { conn->privateData =3D NULL; return 0; @@ -957,7 +957,7 @@ libxlConnectGetSysinfo(virConnectPtr conn, unsigned int= flags) } =20 static int -libxlConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNU= SED) +libxlConnectGetMaxVcpus(virConnectPtr conn, const char *type G_GNUC_UNUSED) { int ret; libxlDriverPrivatePtr driver =3D conn->privateData; @@ -3613,8 +3613,8 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef, = virDomainDeviceDefPtr dev) } =20 static int -libxlComparePCIDevice(virDomainDefPtr def ATTRIBUTE_UNUSED, - virDomainDeviceDefPtr device ATTRIBUTE_UNUSED, +libxlComparePCIDevice(virDomainDefPtr def G_GNUC_UNUSED, + virDomainDeviceDefPtr device G_GNUC_UNUSED, virDomainDeviceInfoPtr info1, void *opaque) { @@ -5483,9 +5483,9 @@ libxlDomainBlockStatsVBD(virDomainObjPtr vm, } #else static int -libxlDomainBlockStatsVBD(virDomainObjPtr vm ATTRIBUTE_UNUSED, - const char *dev ATTRIBUTE_UNUSED, - libxlBlockStatsPtr stats ATTRIBUTE_UNUSED) +libxlDomainBlockStatsVBD(virDomainObjPtr vm G_GNUC_UNUSED, + const char *dev G_GNUC_UNUSED, + libxlBlockStatsPtr stats G_GNUC_UNUSED) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("platform unsupported")); @@ -5706,7 +5706,7 @@ libxlConnectDomainEventDeregisterAny(virConnectPtr co= nn, int callbackID) =20 =20 static int -libxlConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED) +libxlConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED) { return 1; } @@ -5986,8 +5986,8 @@ libxlDomainMigratePrepareTunnel3Params(virConnectPtr = dconn, int nparams, const char *cookiein, int cookieinlen, - char **cookieout ATTRIBUTE_UNUSED, - int *cookieoutlen ATTRIBUTE_UNUSED, + char **cookieout G_GNUC_UNUSED, + int *cookieoutlen G_GNUC_UNUSED, unsigned int flags) { libxlDriverPrivatePtr driver =3D dconn->privateData; @@ -6040,8 +6040,8 @@ libxlDomainMigratePrepare3Params(virConnectPtr dconn, int nparams, const char *cookiein, int cookieinlen, - char **cookieout ATTRIBUTE_UNUSED, - int *cookieoutlen ATTRIBUTE_UNUSED, + char **cookieout G_GNUC_UNUSED, + int *cookieoutlen G_GNUC_UNUSED, char **uri_out, unsigned int flags) { @@ -6094,10 +6094,10 @@ libxlDomainMigratePerform3Params(virDomainPtr dom, const char *dconnuri, virTypedParameterPtr params, int nparams, - const char *cookiein ATTRIBUTE_UNUSED, - int cookieinlen ATTRIBUTE_UNUSED, - char **cookieout ATTRIBUTE_UNUSED, - int *cookieoutlen ATTRIBUTE_UNUSED, + const char *cookiein G_GNUC_UNUSED, + int cookieinlen G_GNUC_UNUSED, + char **cookieout G_GNUC_UNUSED, + int *cookieoutlen G_GNUC_UNUSED, unsigned int flags) { libxlDriverPrivatePtr driver =3D dom->conn->privateData; @@ -6155,10 +6155,10 @@ static virDomainPtr libxlDomainMigrateFinish3Params(virConnectPtr dconn, virTypedParameterPtr params, int nparams, - const char *cookiein ATTRIBUTE_UNUSED, - int cookieinlen ATTRIBUTE_UNUSED, - char **cookieout ATTRIBUTE_UNUSED, - int *cookieoutlen ATTRIBUTE_UNUSED, + const char *cookiein G_GNUC_UNUSED, + int cookieinlen G_GNUC_UNUSED, + char **cookieout G_GNUC_UNUSED, + int *cookieoutlen G_GNUC_UNUSED, unsigned int flags, int cancelled) { @@ -6207,8 +6207,8 @@ static int libxlDomainMigrateConfirm3Params(virDomainPtr domain, virTypedParameterPtr params, int nparams, - const char *cookiein ATTRIBUTE_UNUSED, - int cookieinlen ATTRIBUTE_UNUSED, + const char *cookiein G_GNUC_UNUSED, + int cookieinlen G_GNUC_UNUSED, unsigned int flags, int cancelled) { diff --git a/src/libxl/libxl_logger.c b/src/libxl/libxl_logger.c index 7c97da45d5..b4a38ae865 100644 --- a/src/libxl/libxl_logger.c +++ b/src/libxl/libxl_logger.c @@ -47,7 +47,7 @@ struct xentoollog_logger_libvirt { }; =20 static void -libxlLoggerFileFree(void *payload, const void *key ATTRIBUTE_UNUSED) +libxlLoggerFileFree(void *payload, const void *key G_GNUC_UNUSED) { FILE *file =3D payload; VIR_FORCE_FCLOSE(file); @@ -114,12 +114,12 @@ libvirt_vmessage(xentoollog_logger *logger_in, } =20 static void -libvirt_progress(xentoollog_logger *logger_in ATTRIBUTE_UNUSED, - const char *context ATTRIBUTE_UNUSED, - const char *doingwhat ATTRIBUTE_UNUSED, - int percent ATTRIBUTE_UNUSED, - unsigned long done ATTRIBUTE_UNUSED, - unsigned long total ATTRIBUTE_UNUSED) +libvirt_progress(xentoollog_logger *logger_in G_GNUC_UNUSED, + const char *context G_GNUC_UNUSED, + const char *doingwhat G_GNUC_UNUSED, + int percent G_GNUC_UNUSED, + unsigned long done G_GNUC_UNUSED, + unsigned long total G_GNUC_UNUSED) { /* This function purposedly does nothing: it's no logging info */ } diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index a1021d499b..ea325bf2cb 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -287,7 +287,7 @@ libxlDoMigrateDstReceive(void *opaque) =20 static void libxlMigrateDstReceive(virNetSocketPtr sock, - int events ATTRIBUTE_UNUSED, + int events G_GNUC_UNUSED, void *opaque) { libxlMigrationDstArgs *args =3D opaque; @@ -979,7 +979,7 @@ libxlDoMigrateSrcP2P(libxlDriverPrivatePtr driver, virConnectPtr sconn, const char *xmlin, virConnectPtr dconn, - const char *dconnuri ATTRIBUTE_UNUSED, + const char *dconnuri G_GNUC_UNUSED, const char *dname, const char *uri, unsigned int flags) @@ -1152,7 +1152,7 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivateP= tr driver, virConnectPtr sconn, const char *xmlin, const char *dconnuri, - const char *uri_str ATTRIBUTE_UNUSED, + const char *uri_str G_GNUC_UNUSED, const char *dname, unsigned int flags) { @@ -1215,10 +1215,10 @@ libxlDomainMigrationSrcPerformP2P(libxlDriverPrivat= ePtr driver, int libxlDomainMigrationSrcPerform(libxlDriverPrivatePtr driver, virDomainObjPtr vm, - const char *dom_xml ATTRIBUTE_UNUSED, - const char *dconnuri ATTRIBUTE_UNUSED, + const char *dom_xml G_GNUC_UNUSED, + const char *dconnuri G_GNUC_UNUSED, const char *uri_str, - const char *dname ATTRIBUTE_UNUSED, + const char *dname G_GNUC_UNUSED, unsigned int flags) { libxlDomainObjPrivatePtr priv =3D vm->privateData; --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list