提交 8b5ef0a6 编写于 作者: J Ján Tomko

rpc: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 6727ca6b
......@@ -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;
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -574,6 +574,6 @@ int virNetServerProgramSendStreamHole(virNetServerProgramPtr prog,
}
void virNetServerProgramDispose(void *obj ATTRIBUTE_UNUSED)
void virNetServerProgramDispose(void *obj G_GNUC_UNUSED)
{
}
......@@ -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;
......
......@@ -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)
{
......
......@@ -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,
......
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册