rpc: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2019-10-14 14:45:33 +02:00
parent 6727ca6b2a
commit 8b5ef0a6b8
11 changed files with 73 additions and 73 deletions

View File

@ -148,7 +148,7 @@ virKeepAliveTimerInternal(virKeepAlivePtr ka,
static void static void
virKeepAliveTimer(int timer ATTRIBUTE_UNUSED, void *opaque) virKeepAliveTimer(int timer G_GNUC_UNUSED, void *opaque)
{ {
virKeepAlivePtr ka = opaque; virKeepAlivePtr ka = opaque;
virNetMessagePtr msg = NULL; virNetMessagePtr msg = NULL;

View File

@ -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 static int
virNetClientProgramDispatchError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED, virNetClientProgramDispatchError(virNetClientProgramPtr prog G_GNUC_UNUSED,
virNetMessagePtr msg) virNetMessagePtr msg)
{ {
virNetMessageError err; virNetMessageError err;

View File

@ -98,7 +98,7 @@ virNetClientStreamEventTimerUpdate(virNetClientStreamPtr st)
static void static void
virNetClientStreamEventTimer(int timer ATTRIBUTE_UNUSED, void *opaque) virNetClientStreamEventTimer(int timer G_GNUC_UNUSED, void *opaque)
{ {
virNetClientStreamPtr st = opaque; virNetClientStreamPtr st = opaque;
int events = 0; int events = 0;
@ -688,7 +688,7 @@ virNetClientStreamSendHole(virNetClientStreamPtr st,
int int
virNetClientStreamRecvHole(virNetClientPtr client ATTRIBUTE_UNUSED, virNetClientStreamRecvHole(virNetClientPtr client G_GNUC_UNUSED,
virNetClientStreamPtr st, virNetClientStreamPtr st,
long long *length) long long *length)
{ {

View File

@ -210,7 +210,7 @@ struct collectData {
static int static int
collectServers(void *payload, collectServers(void *payload,
const void *name ATTRIBUTE_UNUSED, const void *name G_GNUC_UNUSED,
void *opaque) void *opaque)
{ {
virNetServerPtr srv = virObjectRef(payload); virNetServerPtr srv = virObjectRef(payload);
@ -594,7 +594,7 @@ static int sigWrite = -1;
static void static void
virNetDaemonSignalHandler(int sig, siginfo_t * siginfo, virNetDaemonSignalHandler(int sig, siginfo_t * siginfo,
void* context ATTRIBUTE_UNUSED) void* context G_GNUC_UNUSED)
{ {
int origerrno; int origerrno;
int r; int r;
@ -619,8 +619,8 @@ virNetDaemonSignalHandler(int sig, siginfo_t * siginfo,
static void static void
virNetDaemonSignalEvent(int watch, virNetDaemonSignalEvent(int watch,
int fd ATTRIBUTE_UNUSED, int fd G_GNUC_UNUSED,
int events ATTRIBUTE_UNUSED, int events G_GNUC_UNUSED,
void *opaque) void *opaque)
{ {
virNetDaemonPtr dmn = opaque; virNetDaemonPtr dmn = opaque;
@ -733,7 +733,7 @@ virNetDaemonAddSignalHandler(virNetDaemonPtr dmn,
static void static void
virNetDaemonAutoShutdownTimer(int timerid ATTRIBUTE_UNUSED, virNetDaemonAutoShutdownTimer(int timerid G_GNUC_UNUSED,
void *opaque) void *opaque)
{ {
virNetDaemonPtr dmn = opaque; virNetDaemonPtr dmn = opaque;
@ -750,7 +750,7 @@ virNetDaemonAutoShutdownTimer(int timerid ATTRIBUTE_UNUSED,
static int static int
daemonServerUpdateServices(void *payload, daemonServerUpdateServices(void *payload,
const void *key ATTRIBUTE_UNUSED, const void *key G_GNUC_UNUSED,
void *opaque) void *opaque)
{ {
bool *enable = opaque; bool *enable = opaque;
@ -771,8 +771,8 @@ virNetDaemonUpdateServices(virNetDaemonPtr dmn,
static int static int
daemonServerProcessClients(void *payload, daemonServerProcessClients(void *payload,
const void *key ATTRIBUTE_UNUSED, const void *key G_GNUC_UNUSED,
void *opaque ATTRIBUTE_UNUSED) void *opaque G_GNUC_UNUSED)
{ {
virNetServerPtr srv = payload; virNetServerPtr srv = payload;
@ -861,8 +861,8 @@ virNetDaemonQuit(virNetDaemonPtr dmn)
static int static int
daemonServerClose(void *payload, daemonServerClose(void *payload,
const void *key ATTRIBUTE_UNUSED, const void *key G_GNUC_UNUSED,
void *opaque ATTRIBUTE_UNUSED) void *opaque G_GNUC_UNUSED)
{ {
virNetServerPtr srv = payload; virNetServerPtr srv = payload;
@ -885,7 +885,7 @@ virNetDaemonClose(virNetDaemonPtr dmn)
static int static int
daemonServerHasClients(void *payload, daemonServerHasClients(void *payload,
const void *key ATTRIBUTE_UNUSED, const void *key G_GNUC_UNUSED,
void *opaque) void *opaque)
{ {
bool *clients = opaque; bool *clients = opaque;

View File

@ -414,7 +414,7 @@ virNetLibsshAuthenticatePrivkeyCb(const char *prompt,
char *buf, char *buf,
size_t len, size_t len,
int echo, int echo,
int verify ATTRIBUTE_UNUSED, int verify G_GNUC_UNUSED,
void *userdata) void *userdata)
{ {
virNetLibsshSessionPtr sess = userdata; virNetLibsshSessionPtr sess = userdata;

View File

@ -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 *service,
const char *hostname, const char *hostname,
const char *localAddr, const char *localAddr,
@ -222,7 +222,7 @@ virNetSASLSessionPtr virNetSASLSessionNewClient(virNetSASLContextPtr ctxt ATTRIB
return NULL; return NULL;
} }
virNetSASLSessionPtr virNetSASLSessionNewServer(virNetSASLContextPtr ctxt ATTRIBUTE_UNUSED, virNetSASLSessionPtr virNetSASLSessionNewServer(virNetSASLContextPtr ctxt G_GNUC_UNUSED,
const char *service, const char *service,
const char *localAddr, const char *localAddr,
const char *remoteAddr) const char *remoteAddr)
@ -697,7 +697,7 @@ ssize_t virNetSASLSessionDecode(virNetSASLSessionPtr sasl,
return ret; return ret;
} }
void virNetSASLContextDispose(void *obj ATTRIBUTE_UNUSED) void virNetSASLContextDispose(void *obj G_GNUC_UNUSED)
{ {
return; return;
} }

View File

@ -574,6 +574,6 @@ int virNetServerProgramSendStreamHole(virNetServerProgramPtr prog,
} }
void virNetServerProgramDispose(void *obj ATTRIBUTE_UNUSED) void virNetServerProgramDispose(void *obj G_GNUC_UNUSED)
{ {
} }

View File

@ -66,7 +66,7 @@ VIR_ONCE_GLOBAL_INIT(virNetServerService);
static void virNetServerServiceAccept(virNetSocketPtr sock, static void virNetServerServiceAccept(virNetSocketPtr sock,
int events ATTRIBUTE_UNUSED, int events G_GNUC_UNUSED,
void *opaque) void *opaque)
{ {
virNetServerServicePtr svc = opaque; virNetServerServicePtr svc = opaque;

View File

@ -530,11 +530,11 @@ int virNetSocketNewListenUNIX(const char *path,
return -1; return -1;
} }
#else #else
int virNetSocketNewListenUNIX(const char *path ATTRIBUTE_UNUSED, int virNetSocketNewListenUNIX(const char *path G_GNUC_UNUSED,
mode_t mask ATTRIBUTE_UNUSED, mode_t mask G_GNUC_UNUSED,
uid_t user ATTRIBUTE_UNUSED, uid_t user G_GNUC_UNUSED,
gid_t grp ATTRIBUTE_UNUSED, gid_t grp G_GNUC_UNUSED,
virNetSocketPtr *retsock ATTRIBUTE_UNUSED) virNetSocketPtr *retsock G_GNUC_UNUSED)
{ {
virReportSystemError(ENOSYS, "%s", virReportSystemError(ENOSYS, "%s",
_("UNIX sockets are not supported on this platform")); _("UNIX sockets are not supported on this platform"));
@ -777,10 +777,10 @@ int virNetSocketNewConnectUNIX(const char *path,
return ret; return ret;
} }
#else #else
int virNetSocketNewConnectUNIX(const char *path ATTRIBUTE_UNUSED, int virNetSocketNewConnectUNIX(const char *path G_GNUC_UNUSED,
bool spawnDaemon ATTRIBUTE_UNUSED, bool spawnDaemon G_GNUC_UNUSED,
const char *binary ATTRIBUTE_UNUSED, const char *binary G_GNUC_UNUSED,
virNetSocketPtr *retsock ATTRIBUTE_UNUSED) virNetSocketPtr *retsock G_GNUC_UNUSED)
{ {
virReportSystemError(ENOSYS, "%s", virReportSystemError(ENOSYS, "%s",
_("UNIX sockets are not supported on this platform")); _("UNIX sockets are not supported on this platform"));
@ -845,8 +845,8 @@ int virNetSocketNewConnectCommand(virCommandPtr cmd,
return -1; return -1;
} }
#else #else
int virNetSocketNewConnectCommand(virCommandPtr cmd ATTRIBUTE_UNUSED, int virNetSocketNewConnectCommand(virCommandPtr cmd G_GNUC_UNUSED,
virNetSocketPtr *retsock ATTRIBUTE_UNUSED) virNetSocketPtr *retsock G_GNUC_UNUSED)
{ {
virReportSystemError(errno, "%s", virReportSystemError(errno, "%s",
_("Tunnelling sockets not supported on this platform")); _("Tunnelling sockets not supported on this platform"));
@ -1052,18 +1052,18 @@ virNetSocketNewConnectLibSSH2(const char *host,
} }
#else #else
int int
virNetSocketNewConnectLibSSH2(const char *host ATTRIBUTE_UNUSED, virNetSocketNewConnectLibSSH2(const char *host G_GNUC_UNUSED,
const char *port ATTRIBUTE_UNUSED, const char *port G_GNUC_UNUSED,
int family ATTRIBUTE_UNUSED, int family G_GNUC_UNUSED,
const char *username ATTRIBUTE_UNUSED, const char *username G_GNUC_UNUSED,
const char *privkey ATTRIBUTE_UNUSED, const char *privkey G_GNUC_UNUSED,
const char *knownHosts ATTRIBUTE_UNUSED, const char *knownHosts G_GNUC_UNUSED,
const char *knownHostsVerify ATTRIBUTE_UNUSED, const char *knownHostsVerify G_GNUC_UNUSED,
const char *authMethods ATTRIBUTE_UNUSED, const char *authMethods G_GNUC_UNUSED,
const char *command ATTRIBUTE_UNUSED, const char *command G_GNUC_UNUSED,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth G_GNUC_UNUSED,
virURIPtr uri ATTRIBUTE_UNUSED, virURIPtr uri G_GNUC_UNUSED,
virNetSocketPtr *retsock ATTRIBUTE_UNUSED) virNetSocketPtr *retsock G_GNUC_UNUSED)
{ {
virReportSystemError(ENOSYS, "%s", virReportSystemError(ENOSYS, "%s",
_("libssh2 transport support was not enabled")); _("libssh2 transport support was not enabled"));
@ -1189,18 +1189,18 @@ virNetSocketNewConnectLibssh(const char *host,
} }
#else #else
int int
virNetSocketNewConnectLibssh(const char *host ATTRIBUTE_UNUSED, virNetSocketNewConnectLibssh(const char *host G_GNUC_UNUSED,
const char *port ATTRIBUTE_UNUSED, const char *port G_GNUC_UNUSED,
int family ATTRIBUTE_UNUSED, int family G_GNUC_UNUSED,
const char *username ATTRIBUTE_UNUSED, const char *username G_GNUC_UNUSED,
const char *privkey ATTRIBUTE_UNUSED, const char *privkey G_GNUC_UNUSED,
const char *knownHosts ATTRIBUTE_UNUSED, const char *knownHosts G_GNUC_UNUSED,
const char *knownHostsVerify ATTRIBUTE_UNUSED, const char *knownHostsVerify G_GNUC_UNUSED,
const char *authMethods ATTRIBUTE_UNUSED, const char *authMethods G_GNUC_UNUSED,
const char *command ATTRIBUTE_UNUSED, const char *command G_GNUC_UNUSED,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth G_GNUC_UNUSED,
virURIPtr uri ATTRIBUTE_UNUSED, virURIPtr uri G_GNUC_UNUSED,
virNetSocketPtr *retsock ATTRIBUTE_UNUSED) virNetSocketPtr *retsock G_GNUC_UNUSED)
{ {
virReportSystemError(ENOSYS, "%s", virReportSystemError(ENOSYS, "%s",
_("libssh transport support was not enabled")); _("libssh transport support was not enabled"));
@ -1602,11 +1602,11 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock,
return ret; return ret;
} }
#else #else
int virNetSocketGetUNIXIdentity(virNetSocketPtr sock ATTRIBUTE_UNUSED, int virNetSocketGetUNIXIdentity(virNetSocketPtr sock G_GNUC_UNUSED,
uid_t *uid ATTRIBUTE_UNUSED, uid_t *uid G_GNUC_UNUSED,
gid_t *gid ATTRIBUTE_UNUSED, gid_t *gid G_GNUC_UNUSED,
pid_t *pid ATTRIBUTE_UNUSED, pid_t *pid G_GNUC_UNUSED,
unsigned long long *timestamp ATTRIBUTE_UNUSED) unsigned long long *timestamp G_GNUC_UNUSED)
{ {
/* XXX Many more OS support UNIX socket credentials we could port to. See dbus ....*/ /* XXX Many more OS support UNIX socket credentials we could port to. See dbus ....*/
virReportSystemError(ENOSYS, "%s", virReportSystemError(ENOSYS, "%s",
@ -1645,7 +1645,7 @@ int virNetSocketGetSELinuxContext(virNetSocketPtr sock,
return ret; return ret;
} }
#else #else
int virNetSocketGetSELinuxContext(virNetSocketPtr sock ATTRIBUTE_UNUSED, int virNetSocketGetSELinuxContext(virNetSocketPtr sock G_GNUC_UNUSED,
char **context) char **context)
{ {
*context = NULL; *context = NULL;
@ -1725,7 +1725,7 @@ void virNetSocketSetSASLSession(virNetSocketPtr sock,
#endif #endif
bool virNetSocketHasCachedData(virNetSocketPtr sock ATTRIBUTE_UNUSED) bool virNetSocketHasCachedData(virNetSocketPtr sock G_GNUC_UNUSED)
{ {
bool hasCached = false; bool hasCached = false;
virObjectLock(sock); virObjectLock(sock);
@ -1780,7 +1780,7 @@ static ssize_t virNetSocketLibsshWrite(virNetSocketPtr sock,
} }
#endif #endif
bool virNetSocketHasPendingData(virNetSocketPtr sock ATTRIBUTE_UNUSED) bool virNetSocketHasPendingData(virNetSocketPtr sock G_GNUC_UNUSED)
{ {
bool hasPending = false; bool hasPending = false;
virObjectLock(sock); virObjectLock(sock);
@ -2178,8 +2178,8 @@ int virNetSocketAccept(virNetSocketPtr sock, virNetSocketPtr *clientsock)
} }
static void virNetSocketEventHandle(int watch ATTRIBUTE_UNUSED, static void virNetSocketEventHandle(int watch G_GNUC_UNUSED,
int fd ATTRIBUTE_UNUSED, int fd G_GNUC_UNUSED,
int events, int events,
void *opaque) void *opaque)
{ {

View File

@ -191,10 +191,10 @@ virNetSSHSessionAuthMethodNew(virNetSSHSessionPtr sess)
/* keyboard interactive authentication callback */ /* keyboard interactive authentication callback */
static void static void
virNetSSHKbIntCb(const char *name ATTRIBUTE_UNUSED, virNetSSHKbIntCb(const char *name G_GNUC_UNUSED,
int name_len ATTRIBUTE_UNUSED, int name_len G_GNUC_UNUSED,
const char *instruction ATTRIBUTE_UNUSED, const char *instruction G_GNUC_UNUSED,
int instruction_len ATTRIBUTE_UNUSED, int instruction_len G_GNUC_UNUSED,
int num_prompts, int num_prompts,
const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,
LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,

View File

@ -115,8 +115,8 @@ virNetTLSContextCheckCertFile(const char *type, const char *file, bool allowMiss
} }
static void virNetTLSLog(int level ATTRIBUTE_UNUSED, static void virNetTLSLog(int level G_GNUC_UNUSED,
const char *str ATTRIBUTE_UNUSED) const char *str G_GNUC_UNUSED)
{ {
VIR_DEBUG("%d %s", level, str); VIR_DEBUG("%d %s", level, str);
} }