Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/rpc/virkeepalive.c | 2 +-
src/rpc/virnetclientprogram.c | 4 +-
src/rpc/virnetclientstream.c | 4 +-
src/rpc/virnetdaemon.c | 22 ++++-----
src/rpc/virnetlibsshsession.c | 2 +-
src/rpc/virnetsaslcontext.c | 6 +--
src/rpc/virnetserverprogram.c | 2 +-
src/rpc/virnetserverservice.c | 2 +-
src/rpc/virnetsocket.c | 90 +++++++++++++++++------------------
src/rpc/virnetsshsession.c | 8 ++--
src/rpc/virnettlscontext.c | 4 +-
11 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/src/rpc/virkeepalive.c b/src/rpc/virkeepalive.c
index 5906cdfa19..860b91b6b1 100644
--- a/src/rpc/virkeepalive.c
+++ b/src/rpc/virkeepalive.c
@@ -148,7 +148,7 @@ virKeepAliveTimerInternal(virKeepAlivePtr ka,
static void
-virKeepAliveTimer(int timer ATTRIBUTE_UNUSED, void *opaque)
+virKeepAliveTimer(int timer G_GNUC_UNUSED, void *opaque)
{
virKeepAlivePtr ka = opaque;
virNetMessagePtr msg = NULL;
diff --git a/src/rpc/virnetclientprogram.c b/src/rpc/virnetclientprogram.c
index 58f24145ec..4d1a2bc28b 100644
--- a/src/rpc/virnetclientprogram.c
+++ b/src/rpc/virnetclientprogram.c
@@ -85,7 +85,7 @@ virNetClientProgramPtr virNetClientProgramNew(unsigned program,
}
-void virNetClientProgramDispose(void *obj ATTRIBUTE_UNUSED)
+void virNetClientProgramDispose(void *obj G_GNUC_UNUSED)
{
}
@@ -113,7 +113,7 @@ int virNetClientProgramMatches(virNetClientProgramPtr prog,
static int
-virNetClientProgramDispatchError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
+virNetClientProgramDispatchError(virNetClientProgramPtr prog G_GNUC_UNUSED,
virNetMessagePtr msg)
{
virNetMessageError err;
diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c
index 834c44843b..f904eaba31 100644
--- a/src/rpc/virnetclientstream.c
+++ b/src/rpc/virnetclientstream.c
@@ -98,7 +98,7 @@ virNetClientStreamEventTimerUpdate(virNetClientStreamPtr st)
static void
-virNetClientStreamEventTimer(int timer ATTRIBUTE_UNUSED, void *opaque)
+virNetClientStreamEventTimer(int timer G_GNUC_UNUSED, void *opaque)
{
virNetClientStreamPtr st = opaque;
int events = 0;
@@ -688,7 +688,7 @@ virNetClientStreamSendHole(virNetClientStreamPtr st,
int
-virNetClientStreamRecvHole(virNetClientPtr client ATTRIBUTE_UNUSED,
+virNetClientStreamRecvHole(virNetClientPtr client G_GNUC_UNUSED,
virNetClientStreamPtr st,
long long *length)
{
diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c
index 7b68ddbdf2..570930436a 100644
--- a/src/rpc/virnetdaemon.c
+++ b/src/rpc/virnetdaemon.c
@@ -210,7 +210,7 @@ struct collectData {
static int
collectServers(void *payload,
- const void *name ATTRIBUTE_UNUSED,
+ const void *name G_GNUC_UNUSED,
void *opaque)
{
virNetServerPtr srv = virObjectRef(payload);
@@ -594,7 +594,7 @@ static int sigWrite = -1;
static void
virNetDaemonSignalHandler(int sig, siginfo_t * siginfo,
- void* context ATTRIBUTE_UNUSED)
+ void* context G_GNUC_UNUSED)
{
int origerrno;
int r;
@@ -619,8 +619,8 @@ virNetDaemonSignalHandler(int sig, siginfo_t * siginfo,
static void
virNetDaemonSignalEvent(int watch,
- int fd ATTRIBUTE_UNUSED,
- int events ATTRIBUTE_UNUSED,
+ int fd G_GNUC_UNUSED,
+ int events G_GNUC_UNUSED,
void *opaque)
{
virNetDaemonPtr dmn = opaque;
@@ -733,7 +733,7 @@ virNetDaemonAddSignalHandler(virNetDaemonPtr dmn,
static void
-virNetDaemonAutoShutdownTimer(int timerid ATTRIBUTE_UNUSED,
+virNetDaemonAutoShutdownTimer(int timerid G_GNUC_UNUSED,
void *opaque)
{
virNetDaemonPtr dmn = opaque;
@@ -750,7 +750,7 @@ virNetDaemonAutoShutdownTimer(int timerid ATTRIBUTE_UNUSED,
static int
daemonServerUpdateServices(void *payload,
- const void *key ATTRIBUTE_UNUSED,
+ const void *key G_GNUC_UNUSED,
void *opaque)
{
bool *enable = opaque;
@@ -771,8 +771,8 @@ virNetDaemonUpdateServices(virNetDaemonPtr dmn,
static int
daemonServerProcessClients(void *payload,
- const void *key ATTRIBUTE_UNUSED,
- void *opaque ATTRIBUTE_UNUSED)
+ const void *key G_GNUC_UNUSED,
+ void *opaque G_GNUC_UNUSED)
{
virNetServerPtr srv = payload;
@@ -861,8 +861,8 @@ virNetDaemonQuit(virNetDaemonPtr dmn)
static int
daemonServerClose(void *payload,
- const void *key ATTRIBUTE_UNUSED,
- void *opaque ATTRIBUTE_UNUSED)
+ const void *key G_GNUC_UNUSED,
+ void *opaque G_GNUC_UNUSED)
{
virNetServerPtr srv = payload;
@@ -885,7 +885,7 @@ virNetDaemonClose(virNetDaemonPtr dmn)
static int
daemonServerHasClients(void *payload,
- const void *key ATTRIBUTE_UNUSED,
+ const void *key G_GNUC_UNUSED,
void *opaque)
{
bool *clients = opaque;
diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c
index 62cbe1e06a..136bb1cc33 100644
--- a/src/rpc/virnetlibsshsession.c
+++ b/src/rpc/virnetlibsshsession.c
@@ -414,7 +414,7 @@ virNetLibsshAuthenticatePrivkeyCb(const char *prompt,
char *buf,
size_t len,
int echo,
- int verify ATTRIBUTE_UNUSED,
+ int verify G_GNUC_UNUSED,
void *userdata)
{
virNetLibsshSessionPtr sess = userdata;
diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c
index 62b103a428..f579162aa2 100644
--- a/src/rpc/virnetsaslcontext.c
+++ b/src/rpc/virnetsaslcontext.c
@@ -184,7 +184,7 @@ int virNetSASLContextCheckIdentity(virNetSASLContextPtr ctxt,
}
-virNetSASLSessionPtr virNetSASLSessionNewClient(virNetSASLContextPtr ctxt
ATTRIBUTE_UNUSED,
+virNetSASLSessionPtr virNetSASLSessionNewClient(virNetSASLContextPtr ctxt G_GNUC_UNUSED,
const char *service,
const char *hostname,
const char *localAddr,
@@ -222,7 +222,7 @@ virNetSASLSessionPtr virNetSASLSessionNewClient(virNetSASLContextPtr
ctxt ATTRIB
return NULL;
}
-virNetSASLSessionPtr virNetSASLSessionNewServer(virNetSASLContextPtr ctxt
ATTRIBUTE_UNUSED,
+virNetSASLSessionPtr virNetSASLSessionNewServer(virNetSASLContextPtr ctxt G_GNUC_UNUSED,
const char *service,
const char *localAddr,
const char *remoteAddr)
@@ -697,7 +697,7 @@ ssize_t virNetSASLSessionDecode(virNetSASLSessionPtr sasl,
return ret;
}
-void virNetSASLContextDispose(void *obj ATTRIBUTE_UNUSED)
+void virNetSASLContextDispose(void *obj G_GNUC_UNUSED)
{
return;
}
diff --git a/src/rpc/virnetserverprogram.c b/src/rpc/virnetserverprogram.c
index cca820ca5a..e3fa810a3f 100644
--- a/src/rpc/virnetserverprogram.c
+++ b/src/rpc/virnetserverprogram.c
@@ -574,6 +574,6 @@ int virNetServerProgramSendStreamHole(virNetServerProgramPtr prog,
}
-void virNetServerProgramDispose(void *obj ATTRIBUTE_UNUSED)
+void virNetServerProgramDispose(void *obj G_GNUC_UNUSED)
{
}
diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index 66af27d9f7..5d1178f899 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -66,7 +66,7 @@ VIR_ONCE_GLOBAL_INIT(virNetServerService);
static void virNetServerServiceAccept(virNetSocketPtr sock,
- int events ATTRIBUTE_UNUSED,
+ int events G_GNUC_UNUSED,
void *opaque)
{
virNetServerServicePtr svc = opaque;
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index bd5fa96751..15791ceb35 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -530,11 +530,11 @@ int virNetSocketNewListenUNIX(const char *path,
return -1;
}
#else
-int virNetSocketNewListenUNIX(const char *path ATTRIBUTE_UNUSED,
- mode_t mask ATTRIBUTE_UNUSED,
- uid_t user ATTRIBUTE_UNUSED,
- gid_t grp ATTRIBUTE_UNUSED,
- virNetSocketPtr *retsock ATTRIBUTE_UNUSED)
+int virNetSocketNewListenUNIX(const char *path G_GNUC_UNUSED,
+ mode_t mask G_GNUC_UNUSED,
+ uid_t user G_GNUC_UNUSED,
+ gid_t grp G_GNUC_UNUSED,
+ virNetSocketPtr *retsock G_GNUC_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("UNIX sockets are not supported on this
platform"));
@@ -777,10 +777,10 @@ int virNetSocketNewConnectUNIX(const char *path,
return ret;
}
#else
-int virNetSocketNewConnectUNIX(const char *path ATTRIBUTE_UNUSED,
- bool spawnDaemon ATTRIBUTE_UNUSED,
- const char *binary ATTRIBUTE_UNUSED,
- virNetSocketPtr *retsock ATTRIBUTE_UNUSED)
+int virNetSocketNewConnectUNIX(const char *path G_GNUC_UNUSED,
+ bool spawnDaemon G_GNUC_UNUSED,
+ const char *binary G_GNUC_UNUSED,
+ virNetSocketPtr *retsock G_GNUC_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("UNIX sockets are not supported on this
platform"));
@@ -845,8 +845,8 @@ int virNetSocketNewConnectCommand(virCommandPtr cmd,
return -1;
}
#else
-int virNetSocketNewConnectCommand(virCommandPtr cmd ATTRIBUTE_UNUSED,
- virNetSocketPtr *retsock ATTRIBUTE_UNUSED)
+int virNetSocketNewConnectCommand(virCommandPtr cmd G_GNUC_UNUSED,
+ virNetSocketPtr *retsock G_GNUC_UNUSED)
{
virReportSystemError(errno, "%s",
_("Tunnelling sockets not supported on this
platform"));
@@ -1052,18 +1052,18 @@ virNetSocketNewConnectLibSSH2(const char *host,
}
#else
int
-virNetSocketNewConnectLibSSH2(const char *host ATTRIBUTE_UNUSED,
- const char *port ATTRIBUTE_UNUSED,
- int family ATTRIBUTE_UNUSED,
- const char *username ATTRIBUTE_UNUSED,
- const char *privkey ATTRIBUTE_UNUSED,
- const char *knownHosts ATTRIBUTE_UNUSED,
- const char *knownHostsVerify ATTRIBUTE_UNUSED,
- const char *authMethods ATTRIBUTE_UNUSED,
- const char *command ATTRIBUTE_UNUSED,
- virConnectAuthPtr auth ATTRIBUTE_UNUSED,
- virURIPtr uri ATTRIBUTE_UNUSED,
- virNetSocketPtr *retsock ATTRIBUTE_UNUSED)
+virNetSocketNewConnectLibSSH2(const char *host G_GNUC_UNUSED,
+ const char *port G_GNUC_UNUSED,
+ int family G_GNUC_UNUSED,
+ const char *username G_GNUC_UNUSED,
+ const char *privkey G_GNUC_UNUSED,
+ const char *knownHosts G_GNUC_UNUSED,
+ const char *knownHostsVerify G_GNUC_UNUSED,
+ const char *authMethods G_GNUC_UNUSED,
+ const char *command G_GNUC_UNUSED,
+ virConnectAuthPtr auth G_GNUC_UNUSED,
+ virURIPtr uri G_GNUC_UNUSED,
+ virNetSocketPtr *retsock G_GNUC_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("libssh2 transport support was not enabled"));
@@ -1189,18 +1189,18 @@ virNetSocketNewConnectLibssh(const char *host,
}
#else
int
-virNetSocketNewConnectLibssh(const char *host ATTRIBUTE_UNUSED,
- const char *port ATTRIBUTE_UNUSED,
- int family ATTRIBUTE_UNUSED,
- const char *username ATTRIBUTE_UNUSED,
- const char *privkey ATTRIBUTE_UNUSED,
- const char *knownHosts ATTRIBUTE_UNUSED,
- const char *knownHostsVerify ATTRIBUTE_UNUSED,
- const char *authMethods ATTRIBUTE_UNUSED,
- const char *command ATTRIBUTE_UNUSED,
- virConnectAuthPtr auth ATTRIBUTE_UNUSED,
- virURIPtr uri ATTRIBUTE_UNUSED,
- virNetSocketPtr *retsock ATTRIBUTE_UNUSED)
+virNetSocketNewConnectLibssh(const char *host G_GNUC_UNUSED,
+ const char *port G_GNUC_UNUSED,
+ int family G_GNUC_UNUSED,
+ const char *username G_GNUC_UNUSED,
+ const char *privkey G_GNUC_UNUSED,
+ const char *knownHosts G_GNUC_UNUSED,
+ const char *knownHostsVerify G_GNUC_UNUSED,
+ const char *authMethods G_GNUC_UNUSED,
+ const char *command G_GNUC_UNUSED,
+ virConnectAuthPtr auth G_GNUC_UNUSED,
+ virURIPtr uri G_GNUC_UNUSED,
+ virNetSocketPtr *retsock G_GNUC_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("libssh transport support was not enabled"));
@@ -1602,11 +1602,11 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock,
return ret;
}
#else
-int virNetSocketGetUNIXIdentity(virNetSocketPtr sock ATTRIBUTE_UNUSED,
- uid_t *uid ATTRIBUTE_UNUSED,
- gid_t *gid ATTRIBUTE_UNUSED,
- pid_t *pid ATTRIBUTE_UNUSED,
- unsigned long long *timestamp ATTRIBUTE_UNUSED)
+int virNetSocketGetUNIXIdentity(virNetSocketPtr sock G_GNUC_UNUSED,
+ uid_t *uid G_GNUC_UNUSED,
+ gid_t *gid G_GNUC_UNUSED,
+ pid_t *pid G_GNUC_UNUSED,
+ unsigned long long *timestamp G_GNUC_UNUSED)
{
/* XXX Many more OS support UNIX socket credentials we could port to. See dbus
....*/
virReportSystemError(ENOSYS, "%s",
@@ -1645,7 +1645,7 @@ int virNetSocketGetSELinuxContext(virNetSocketPtr sock,
return ret;
}
#else
-int virNetSocketGetSELinuxContext(virNetSocketPtr sock ATTRIBUTE_UNUSED,
+int virNetSocketGetSELinuxContext(virNetSocketPtr sock G_GNUC_UNUSED,
char **context)
{
*context = NULL;
@@ -1725,7 +1725,7 @@ void virNetSocketSetSASLSession(virNetSocketPtr sock,
#endif
-bool virNetSocketHasCachedData(virNetSocketPtr sock ATTRIBUTE_UNUSED)
+bool virNetSocketHasCachedData(virNetSocketPtr sock G_GNUC_UNUSED)
{
bool hasCached = false;
virObjectLock(sock);
@@ -1780,7 +1780,7 @@ static ssize_t virNetSocketLibsshWrite(virNetSocketPtr sock,
}
#endif
-bool virNetSocketHasPendingData(virNetSocketPtr sock ATTRIBUTE_UNUSED)
+bool virNetSocketHasPendingData(virNetSocketPtr sock G_GNUC_UNUSED)
{
bool hasPending = false;
virObjectLock(sock);
@@ -2178,8 +2178,8 @@ int virNetSocketAccept(virNetSocketPtr sock, virNetSocketPtr
*clientsock)
}
-static void virNetSocketEventHandle(int watch ATTRIBUTE_UNUSED,
- int fd ATTRIBUTE_UNUSED,
+static void virNetSocketEventHandle(int watch G_GNUC_UNUSED,
+ int fd G_GNUC_UNUSED,
int events,
void *opaque)
{
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index 04b720014d..de39ba31dc 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -191,10 +191,10 @@ virNetSSHSessionAuthMethodNew(virNetSSHSessionPtr sess)
/* keyboard interactive authentication callback */
static void
-virNetSSHKbIntCb(const char *name ATTRIBUTE_UNUSED,
- int name_len ATTRIBUTE_UNUSED,
- const char *instruction ATTRIBUTE_UNUSED,
- int instruction_len ATTRIBUTE_UNUSED,
+virNetSSHKbIntCb(const char *name G_GNUC_UNUSED,
+ int name_len G_GNUC_UNUSED,
+ const char *instruction G_GNUC_UNUSED,
+ int instruction_len G_GNUC_UNUSED,
int num_prompts,
const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,
LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
index 416c8308ed..e4fbe6e59a 100644
--- a/src/rpc/virnettlscontext.c
+++ b/src/rpc/virnettlscontext.c
@@ -115,8 +115,8 @@ virNetTLSContextCheckCertFile(const char *type, const char *file, bool
allowMiss
}
-static void virNetTLSLog(int level ATTRIBUTE_UNUSED,
- const char *str ATTRIBUTE_UNUSED)
+static void virNetTLSLog(int level G_GNUC_UNUSED,
+ const char *str G_GNUC_UNUSED)
{
VIR_DEBUG("%d %s", level, str);
}
--
2.19.2