Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
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 ATTRIBUTE_UNUSED,
* and obj is disposed.
*/
void
-libxlDomainObjEndJob(libxlDriverPrivatePtr driver ATTRIBUTE_UNUSED,
+libxlDomainObjEndJob(libxlDriverPrivatePtr driver G_GNUC_UNUSED,
virDomainObjPtr obj)
{
libxlDomainObjPrivatePtr priv = obj->privateData;
@@ -201,7 +201,7 @@ libxlDomainJobUpdateTime(struct libxlDomainJobObj *job)
}
static void *
-libxlDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
+libxlDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
{
libxlDomainObjPrivatePtr priv;
@@ -246,7 +246,7 @@ libxlDomainObjPrivateFree(void *data)
static int
libxlDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
virDomainObjPtr vm,
- virDomainDefParserConfigPtr config ATTRIBUTE_UNUSED)
+ virDomainDefParserConfigPtr config G_GNUC_UNUSED)
{
libxlDomainObjPrivatePtr priv = vm->privateData;
@@ -278,10 +278,10 @@ virDomainXMLPrivateDataCallbacks libxlDomainXMLPrivateDataCallbacks
= {
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 == VIR_DOMAIN_DEVICE_CHR &&
dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
@@ -367,10 +367,10 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
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 config
* via post-parse callback if not explicitly specified in the XML. */
@@ -1255,7 +1255,7 @@ libxlDomainCreateChannelPTY(virDomainDefPtr def, libxl_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
/*
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)
}
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,
}
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,
}
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 = hnd;
@@ -214,7 +214,7 @@ libxlFDDeregisterEventHook(void *priv ATTRIBUTE_UNUSED,
}
static void
-libxlTimerCallback(int timer ATTRIBUTE_UNUSED, void *timer_info)
+libxlTimerCallback(int timer G_GNUC_UNUSED, void *timer_info)
{
libxlOSEventHookInfoPtr info = timer_info;
@@ -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 = *hndp;
@@ -293,7 +293,7 @@ libxlTimeoutModifyEventHook(void *priv ATTRIBUTE_UNUSED,
}
static void
-libxlTimeoutDeregisterEventHook(void *priv ATTRIBUTE_UNUSED,
+libxlTimeoutDeregisterEventHook(void *priv G_GNUC_UNUSED,
void *hnd)
{
libxlOSEventHookInfoPtr info = hnd;
@@ -649,8 +649,8 @@ libxlAddDom0(libxlDriverPrivatePtr driver)
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 = NULL;
@@ -861,8 +861,8 @@ libxlConnectURIProbe(char **uri)
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,
};
static int
-libxlConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
+libxlConnectClose(virConnectPtr conn G_GNUC_UNUSED)
{
conn->privateData = NULL;
return 0;
@@ -957,7 +957,7 @@ libxlConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
}
static int
-libxlConnectGetMaxVcpus(virConnectPtr conn, const char *type ATTRIBUTE_UNUSED)
+libxlConnectGetMaxVcpus(virConnectPtr conn, const char *type G_GNUC_UNUSED)
{
int ret;
libxlDriverPrivatePtr driver = conn->privateData;
@@ -3613,8 +3613,8 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef,
virDomainDeviceDefPtr dev)
}
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 conn, int
callbackID)
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 = 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 = 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 {
};
static void
-libxlLoggerFileFree(void *payload, const void *key ATTRIBUTE_UNUSED)
+libxlLoggerFileFree(void *payload, const void *key G_GNUC_UNUSED)
{
FILE *file = payload;
VIR_FORCE_FCLOSE(file);
@@ -114,12 +114,12 @@ libvirt_vmessage(xentoollog_logger *logger_in,
}
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)
static void
libxlMigrateDstReceive(virNetSocketPtr sock,
- int events ATTRIBUTE_UNUSED,
+ int events G_GNUC_UNUSED,
void *opaque)
{
libxlMigrationDstArgs *args = 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(libxlDriverPrivatePtr 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(libxlDriverPrivatePtr 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 = vm->privateData;
--
2.19.2