Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/locking/lock_daemon.c | 20 ++++++-------
src/locking/lock_daemon_config.c | 2 +-
src/locking/lock_daemon_dispatch.c | 32 ++++++++++----------
src/locking/lock_driver_lockd.c | 8 ++---
src/locking/lock_driver_nop.c | 48 +++++++++++++++---------------
src/locking/lock_driver_sanlock.c | 10 +++----
src/locking/lock_manager.c | 10 +++----
src/locking/sanlock_helper.c | 6 ++--
8 files changed, 68 insertions(+), 68 deletions(-)
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index c12cb4ea0f..59167d7d31 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -140,7 +140,7 @@ virLockDaemonUnlock(virLockDaemonPtr lockd)
}
static void virLockDaemonLockSpaceDataFree(void *data,
- const void *key ATTRIBUTE_UNUSED)
+ const void *key G_GNUC_UNUSED)
{
virLockSpaceFree(data);
}
@@ -209,7 +209,7 @@ virLockDaemonNew(virLockDaemonConfigPtr config, bool privileged)
static virNetServerPtr
-virLockDaemonNewServerPostExecRestart(virNetDaemonPtr dmn ATTRIBUTE_UNUSED,
+virLockDaemonNewServerPostExecRestart(virNetDaemonPtr dmn G_GNUC_UNUSED,
const char *name,
virJSONValuePtr object,
void *opaque)
@@ -481,8 +481,8 @@ virLockDaemonUnixSocketPaths(bool privileged,
static void
-virLockDaemonErrorHandler(void *opaque ATTRIBUTE_UNUSED,
- virErrorPtr err ATTRIBUTE_UNUSED)
+virLockDaemonErrorHandler(void *opaque G_GNUC_UNUSED,
+ virErrorPtr err G_GNUC_UNUSED)
{
/* Don't do anything, since logging infrastructure already
* took care of reporting the error */
@@ -552,16 +552,16 @@ virLockDaemonVersion(const char *argv0)
static void
virLockDaemonShutdownHandler(virNetDaemonPtr dmn,
- siginfo_t *sig ATTRIBUTE_UNUSED,
- void *opaque ATTRIBUTE_UNUSED)
+ siginfo_t *sig G_GNUC_UNUSED,
+ void *opaque G_GNUC_UNUSED)
{
virNetDaemonQuit(dmn);
}
static void
virLockDaemonExecRestartHandler(virNetDaemonPtr dmn,
- siginfo_t *sig ATTRIBUTE_UNUSED,
- void *opaque ATTRIBUTE_UNUSED)
+ siginfo_t *sig G_GNUC_UNUSED,
+ void *opaque G_GNUC_UNUSED)
{
execRestart = true;
virNetDaemonQuit(dmn);
@@ -590,7 +590,7 @@ struct virLockDaemonClientReleaseData {
static int
virLockDaemonClientReleaseLockspace(void *payload,
- const void *name ATTRIBUTE_UNUSED,
+ const void *name G_GNUC_UNUSED,
void *opaque)
{
virLockSpacePtr lockspace = payload;
@@ -781,7 +781,7 @@ virLockDaemonClientNewPostExecRestart(virNetServerClientPtr client,
static virJSONValuePtr
-virLockDaemonClientPreExecRestart(virNetServerClientPtr client ATTRIBUTE_UNUSED,
+virLockDaemonClientPreExecRestart(virNetServerClientPtr client G_GNUC_UNUSED,
void *opaque)
{
virLockDaemonClientPtr priv = opaque;
diff --git a/src/locking/lock_daemon_config.c b/src/locking/lock_daemon_config.c
index 8df7cf89cd..f77d6c9017 100644
--- a/src/locking/lock_daemon_config.c
+++ b/src/locking/lock_daemon_config.c
@@ -62,7 +62,7 @@ virLockDaemonConfigFilePath(bool privileged, char **configfile)
virLockDaemonConfigPtr
-virLockDaemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
+virLockDaemonConfigNew(bool privileged G_GNUC_UNUSED)
{
virLockDaemonConfigPtr data;
diff --git a/src/locking/lock_daemon_dispatch.c b/src/locking/lock_daemon_dispatch.c
index 7f3c806220..d68fd9cf01 100644
--- a/src/locking/lock_daemon_dispatch.c
+++ b/src/locking/lock_daemon_dispatch.c
@@ -36,9 +36,9 @@ VIR_LOG_INIT("locking.lock_daemon_dispatch");
#include "lock_daemon_dispatch_stubs.h"
static int
-virLockSpaceProtocolDispatchAcquireResource(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchAcquireResource(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolAcquireResourceArgs
*args)
{
@@ -96,9 +96,9 @@ virLockSpaceProtocolDispatchAcquireResource(virNetServerPtr server
ATTRIBUTE_UNU
static int
-virLockSpaceProtocolDispatchCreateResource(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchCreateResource(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolCreateResourceArgs *args)
{
@@ -145,9 +145,9 @@ virLockSpaceProtocolDispatchCreateResource(virNetServerPtr server
ATTRIBUTE_UNUS
static int
-virLockSpaceProtocolDispatchDeleteResource(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchDeleteResource(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolDeleteResourceArgs *args)
{
@@ -194,9 +194,9 @@ virLockSpaceProtocolDispatchDeleteResource(virNetServerPtr server
ATTRIBUTE_UNUS
static int
-virLockSpaceProtocolDispatchNew(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchNew(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolNewArgs *args)
{
@@ -250,9 +250,9 @@ virLockSpaceProtocolDispatchNew(virNetServerPtr server
ATTRIBUTE_UNUSED,
static int
-virLockSpaceProtocolDispatchRegister(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchRegister(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolRegisterArgs *args)
{
@@ -296,9 +296,9 @@ virLockSpaceProtocolDispatchRegister(virNetServerPtr server
ATTRIBUTE_UNUSED,
static int
-virLockSpaceProtocolDispatchReleaseResource(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchReleaseResource(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolReleaseResourceArgs
*args)
{
@@ -347,9 +347,9 @@ virLockSpaceProtocolDispatchReleaseResource(virNetServerPtr server
ATTRIBUTE_UNU
static int
-virLockSpaceProtocolDispatchRestrict(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchRestrict(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolRestrictArgs *args)
{
@@ -386,9 +386,9 @@ virLockSpaceProtocolDispatchRestrict(virNetServerPtr server
ATTRIBUTE_UNUSED,
static int
-virLockSpaceProtocolDispatchCreateLockSpace(virNetServerPtr server ATTRIBUTE_UNUSED,
+virLockSpaceProtocolDispatchCreateLockSpace(virNetServerPtr server G_GNUC_UNUSED,
virNetServerClientPtr client,
- virNetMessagePtr msg ATTRIBUTE_UNUSED,
+ virNetMessagePtr msg G_GNUC_UNUSED,
virNetMessageErrorPtr rerr,
virLockSpaceProtocolCreateLockSpaceArgs
*args)
{
diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 67f512a64e..b29a1da48f 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -174,7 +174,7 @@ virLockManagerLockDaemonConnectionRegister(virLockManagerPtr lock,
static int
-virLockManagerLockDaemonConnectionRestrict(virLockManagerPtr lock ATTRIBUTE_UNUSED,
+virLockManagerLockDaemonConnectionRestrict(virLockManagerPtr lock G_GNUC_UNUSED,
virNetClientPtr client,
virNetClientProgramPtr program,
int *counter)
@@ -621,9 +621,9 @@ static int virLockManagerLockDaemonAddResource(virLockManagerPtr
lock,
static int virLockManagerLockDaemonAcquire(virLockManagerPtr lock,
- const char *state ATTRIBUTE_UNUSED,
+ const char *state G_GNUC_UNUSED,
unsigned int flags,
- virDomainLockFailureAction action
ATTRIBUTE_UNUSED,
+ virDomainLockFailureAction action
G_GNUC_UNUSED,
int *fd)
{
virNetClientPtr client = NULL;
@@ -742,7 +742,7 @@ static int virLockManagerLockDaemonRelease(virLockManagerPtr lock,
}
-static int virLockManagerLockDaemonInquire(virLockManagerPtr lock ATTRIBUTE_UNUSED,
+static int virLockManagerLockDaemonInquire(virLockManagerPtr lock G_GNUC_UNUSED,
char **state,
unsigned int flags)
{
diff --git a/src/locking/lock_driver_nop.c b/src/locking/lock_driver_nop.c
index 227195ff64..1e28a42dc0 100644
--- a/src/locking/lock_driver_nop.c
+++ b/src/locking/lock_driver_nop.c
@@ -29,9 +29,9 @@
VIR_LOG_INIT("locking.lock_driver_nop");
-static int virLockManagerNopInit(unsigned int version ATTRIBUTE_UNUSED,
- const char *configFile ATTRIBUTE_UNUSED,
- unsigned int flags_unused ATTRIBUTE_UNUSED)
+static int virLockManagerNopInit(unsigned int version G_GNUC_UNUSED,
+ const char *configFile G_GNUC_UNUSED,
+ unsigned int flags_unused G_GNUC_UNUSED)
{
VIR_DEBUG("version=%u configFile=%s flags=0x%x",
version, NULLSTR(configFile), flags_unused);
@@ -47,38 +47,38 @@ static int virLockManagerNopDeinit(void)
}
-static int virLockManagerNopNew(virLockManagerPtr lock ATTRIBUTE_UNUSED,
- unsigned int type ATTRIBUTE_UNUSED,
- size_t nparams ATTRIBUTE_UNUSED,
- virLockManagerParamPtr params ATTRIBUTE_UNUSED,
- unsigned int flags_unused ATTRIBUTE_UNUSED)
+static int virLockManagerNopNew(virLockManagerPtr lock G_GNUC_UNUSED,
+ unsigned int type G_GNUC_UNUSED,
+ size_t nparams G_GNUC_UNUSED,
+ virLockManagerParamPtr params G_GNUC_UNUSED,
+ unsigned int flags_unused G_GNUC_UNUSED)
{
return 0;
}
-static int virLockManagerNopAddResource(virLockManagerPtr lock ATTRIBUTE_UNUSED,
- unsigned int type ATTRIBUTE_UNUSED,
- const char *name ATTRIBUTE_UNUSED,
- size_t nparams ATTRIBUTE_UNUSED,
- virLockManagerParamPtr params ATTRIBUTE_UNUSED,
- unsigned int flags_unused ATTRIBUTE_UNUSED)
+static int virLockManagerNopAddResource(virLockManagerPtr lock G_GNUC_UNUSED,
+ unsigned int type G_GNUC_UNUSED,
+ const char *name G_GNUC_UNUSED,
+ size_t nparams G_GNUC_UNUSED,
+ virLockManagerParamPtr params G_GNUC_UNUSED,
+ unsigned int flags_unused G_GNUC_UNUSED)
{
return 0;
}
-static int virLockManagerNopAcquire(virLockManagerPtr lock ATTRIBUTE_UNUSED,
- const char *state ATTRIBUTE_UNUSED,
- unsigned int flags_unused ATTRIBUTE_UNUSED,
- virDomainLockFailureAction action ATTRIBUTE_UNUSED,
- int *fd ATTRIBUTE_UNUSED)
+static int virLockManagerNopAcquire(virLockManagerPtr lock G_GNUC_UNUSED,
+ const char *state G_GNUC_UNUSED,
+ unsigned int flags_unused G_GNUC_UNUSED,
+ virDomainLockFailureAction action G_GNUC_UNUSED,
+ int *fd G_GNUC_UNUSED)
{
return 0;
}
-static int virLockManagerNopRelease(virLockManagerPtr lock ATTRIBUTE_UNUSED,
+static int virLockManagerNopRelease(virLockManagerPtr lock G_GNUC_UNUSED,
char **state,
- unsigned int flags_unused ATTRIBUTE_UNUSED)
+ unsigned int flags_unused G_GNUC_UNUSED)
{
if (state)
*state = NULL;
@@ -86,9 +86,9 @@ static int virLockManagerNopRelease(virLockManagerPtr lock
ATTRIBUTE_UNUSED,
return 0;
}
-static int virLockManagerNopInquire(virLockManagerPtr lock ATTRIBUTE_UNUSED,
+static int virLockManagerNopInquire(virLockManagerPtr lock G_GNUC_UNUSED,
char **state,
- unsigned int flags_unused ATTRIBUTE_UNUSED)
+ unsigned int flags_unused G_GNUC_UNUSED)
{
if (state)
*state = NULL;
@@ -96,7 +96,7 @@ static int virLockManagerNopInquire(virLockManagerPtr lock
ATTRIBUTE_UNUSED,
return 0;
}
-static void virLockManagerNopFree(virLockManagerPtr lock ATTRIBUTE_UNUSED)
+static void virLockManagerNopFree(virLockManagerPtr lock G_GNUC_UNUSED)
{
}
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 7ebd63913e..5a5d130f3a 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -624,7 +624,7 @@ virLockManagerSanlockAddDisk(virLockManagerSanlockDriverPtr driver,
virLockManagerPtr lock,
const char *name,
size_t nparams,
- virLockManagerParamPtr params ATTRIBUTE_UNUSED,
+ virLockManagerParamPtr params G_GNUC_UNUSED,
bool shared)
{
virLockManagerSanlockPrivatePtr priv = lock->privateData;
@@ -920,10 +920,10 @@ virLockManagerSanlockRegisterKillscript(int sock,
}
#else
static int
-virLockManagerSanlockRegisterKillscript(int sock ATTRIBUTE_UNUSED,
- const char *vmuri ATTRIBUTE_UNUSED,
- const char *uuidstr ATTRIBUTE_UNUSED,
- virDomainLockFailureAction action
ATTRIBUTE_UNUSED)
+virLockManagerSanlockRegisterKillscript(int sock G_GNUC_UNUSED,
+ const char *vmuri G_GNUC_UNUSED,
+ const char *uuidstr G_GNUC_UNUSED,
+ virDomainLockFailureAction action G_GNUC_UNUSED)
{
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("sanlock is too old to support lock failure action"));
diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c
index 1c8705ab11..c6940e5a69 100644
--- a/src/locking/lock_manager.c
+++ b/src/locking/lock_manager.c
@@ -196,10 +196,10 @@ virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
}
#else /* !HAVE_DLFCN_H */
virLockManagerPluginPtr
-virLockManagerPluginNew(const char *name ATTRIBUTE_UNUSED,
- const char *driverName ATTRIBUTE_UNUSED,
- const char *configDir ATTRIBUTE_UNUSED,
- unsigned int flags_unused ATTRIBUTE_UNUSED)
+virLockManagerPluginNew(const char *name G_GNUC_UNUSED,
+ const char *driverName G_GNUC_UNUSED,
+ const char *configDir G_GNUC_UNUSED,
+ unsigned int flags_unused G_GNUC_UNUSED)
{
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("this platform is missing dlopen"));
@@ -253,7 +253,7 @@ void virLockManagerPluginUnref(virLockManagerPluginPtr plugin)
VIR_FREE(plugin);
}
#else /* !HAVE_DLFCN_H */
-void virLockManagerPluginUnref(virLockManagerPluginPtr plugin ATTRIBUTE_UNUSED)
+void virLockManagerPluginUnref(virLockManagerPluginPtr plugin G_GNUC_UNUSED)
{
}
#endif /* !HAVE_DLFCN_H */
diff --git a/src/locking/sanlock_helper.c b/src/locking/sanlock_helper.c
index d589576f04..e07db8a6df 100644
--- a/src/locking/sanlock_helper.c
+++ b/src/locking/sanlock_helper.c
@@ -36,9 +36,9 @@ getArgs(int argc,
static int
-authCallback(virConnectCredentialPtr cred ATTRIBUTE_UNUSED,
- unsigned int ncred ATTRIBUTE_UNUSED,
- void *cbdata ATTRIBUTE_UNUSED)
+authCallback(virConnectCredentialPtr cred G_GNUC_UNUSED,
+ unsigned int ncred G_GNUC_UNUSED,
+ void *cbdata G_GNUC_UNUSED)
{
return -1;
}
--
2.19.2