提交 123196aa 编写于 作者: J Ján Tomko

tools: 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>
上级 0d94f024
......@@ -31,7 +31,7 @@
char **
virshDomainNameCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......@@ -168,8 +168,8 @@ virshDomainDiskTargetCompleter(vshControl *ctl,
char **
virshDomainEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
const vshCmd *cmd ATTRIBUTE_UNUSED,
virshDomainEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
......
......@@ -51,7 +51,7 @@ virshPagesizeNodeToString(xmlNodePtr node)
char **
virshAllocpagesPagesizeCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
VIR_AUTOPTR(xmlXPathContext) ctxt = NULL;
......@@ -107,7 +107,7 @@ virshAllocpagesPagesizeCompleter(vshControl *ctl,
char **
virshCellnoCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
VIR_AUTOPTR(xmlXPathContext) ctxt = NULL;
......
......@@ -27,7 +27,7 @@
char **
virshInterfaceNameCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......
......@@ -28,7 +28,7 @@
char **
virshNetworkNameCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......@@ -70,8 +70,8 @@ virshNetworkNameCompleter(vshControl *ctl,
char **
virshNetworkEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
const vshCmd *cmd ATTRIBUTE_UNUSED,
virshNetworkEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
......@@ -97,7 +97,7 @@ virshNetworkEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
char **
virshNetworkPortUUIDCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......
......@@ -29,7 +29,7 @@
char **
virshNodeDeviceNameCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......@@ -68,8 +68,8 @@ virshNodeDeviceNameCompleter(vshControl *ctl,
char **
virshNodeDeviceEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
const vshCmd *cmd ATTRIBUTE_UNUSED,
virshNodeDeviceEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
......
......@@ -27,7 +27,7 @@
char **
virshNWFilterNameCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......@@ -67,7 +67,7 @@ virshNWFilterNameCompleter(vshControl *ctl,
char **
virshNWFilterBindingNameCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......
......@@ -29,7 +29,7 @@
char **
virshStoragePoolNameCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......@@ -71,8 +71,8 @@ virshStoragePoolNameCompleter(vshControl *ctl,
char **
virshPoolEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
const vshCmd *cmd ATTRIBUTE_UNUSED,
virshPoolEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
size_t i = 0;
......
......@@ -28,7 +28,7 @@
char **
virshSecretUUIDCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
virshControlPtr priv = ctl->privData;
......@@ -68,8 +68,8 @@ virshSecretUUIDCompleter(vshControl *ctl,
char **
virshSecretEventNameCompleter(vshControl *ctl ATTRIBUTE_UNUSED,
const vshCmd *cmd ATTRIBUTE_UNUSED,
virshSecretEventNameCompleter(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
size_t i;
......
......@@ -91,7 +91,7 @@ virConsoleOnceInit(void)
VIR_ONCE_GLOBAL_INIT(virConsole);
static void
virConsoleHandleSignal(int sig ATTRIBUTE_UNUSED)
virConsoleHandleSignal(int sig G_GNUC_UNUSED)
{
}
......@@ -232,8 +232,8 @@ virConsoleEventOnStream(virStreamPtr st,
static void
virConsoleEventOnStdin(int watch ATTRIBUTE_UNUSED,
int fd ATTRIBUTE_UNUSED,
virConsoleEventOnStdin(int watch G_GNUC_UNUSED,
int fd G_GNUC_UNUSED,
int events,
void *opaque)
{
......@@ -306,7 +306,7 @@ virConsoleEventOnStdin(int watch ATTRIBUTE_UNUSED,
static void
virConsoleEventOnStdout(int watch ATTRIBUTE_UNUSED,
virConsoleEventOnStdout(int watch G_GNUC_UNUSED,
int fd,
int events,
void *opaque)
......
......@@ -2169,9 +2169,9 @@ static const vshCmdOptDef opts_domstats[] = {
static bool
virshDomainStatsPrintRecord(vshControl *ctl ATTRIBUTE_UNUSED,
virshDomainStatsPrintRecord(vshControl *ctl G_GNUC_UNUSED,
virDomainStatsRecordPtr record,
bool raw ATTRIBUTE_UNUSED)
bool raw G_GNUC_UNUSED)
{
char *param;
size_t i;
......
......@@ -1708,9 +1708,9 @@ virshPrintJobProgress(const char *label, unsigned long long remaining,
static volatile sig_atomic_t intCaught;
static void virshCatchInt(int sig ATTRIBUTE_UNUSED,
siginfo_t *siginfo ATTRIBUTE_UNUSED,
void *context ATTRIBUTE_UNUSED)
static void virshCatchInt(int sig G_GNUC_UNUSED,
siginfo_t *siginfo G_GNUC_UNUSED,
void *context G_GNUC_UNUSED)
{
intCaught = 1;
}
......@@ -1735,10 +1735,10 @@ struct _virshBlockJobWaitData {
static void
virshBlockJobStatusHandler(virConnectPtr conn ATTRIBUTE_UNUSED,
virDomainPtr dom ATTRIBUTE_UNUSED,
virshBlockJobStatusHandler(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom G_GNUC_UNUSED,
const char *disk,
int type ATTRIBUTE_UNUSED,
int type G_GNUC_UNUSED,
int status,
void *opaque)
{
......@@ -9563,7 +9563,7 @@ struct virshQemuEventData {
typedef struct virshQemuEventData virshQemuEventData;
static void
virshEventQemuPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventQemuPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *event,
long long seconds,
......@@ -10904,7 +10904,7 @@ virshMigrateTimeout(vshControl *ctl,
}
static void
virshMigrateIteration(virConnectPtr conn ATTRIBUTE_UNUSED,
virshMigrateIteration(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int iteration,
void *opaque)
......@@ -11765,7 +11765,7 @@ cmdDomHostname(vshControl *ctl, const vshCmd *cmd)
* @n2 second node
* returns true in case n1 covers n2, false otherwise.
*/
ATTRIBUTE_UNUSED
G_GNUC_UNUSED
static bool
virshNodeIsSuperset(xmlNodePtr n1, xmlNodePtr n2)
{
......@@ -13029,7 +13029,7 @@ virshEventPrint(virshDomEventData *data,
}
static void
virshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventGenericPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
void *opaque)
{
......@@ -13042,7 +13042,7 @@ virshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int event,
int detail,
......@@ -13058,7 +13058,7 @@ virshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventRTCChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventRTCChangePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
long long utcoffset,
void *opaque)
......@@ -13072,7 +13072,7 @@ virshEventRTCChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventWatchdogPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventWatchdogPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int action,
void *opaque)
......@@ -13086,7 +13086,7 @@ virshEventWatchdogPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventIOErrorPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventIOErrorPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *srcPath,
const char *devAlias,
......@@ -13104,7 +13104,7 @@ virshEventIOErrorPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventGraphicsPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventGraphicsPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int phase,
const virDomainEventGraphicsAddress *local,
......@@ -13136,7 +13136,7 @@ virshEventGraphicsPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventIOErrorReasonPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventIOErrorReasonPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *srcPath,
const char *devAlias,
......@@ -13157,7 +13157,7 @@ virshEventIOErrorReasonPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventBlockJobPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventBlockJobPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *disk,
int type,
......@@ -13176,7 +13176,7 @@ virshEventBlockJobPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventDiskChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventDiskChangePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *oldSrc,
const char *newSrc,
......@@ -13197,7 +13197,7 @@ virshEventDiskChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventTrayChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventTrayChangePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *alias,
int reason,
......@@ -13213,9 +13213,9 @@ virshEventTrayChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventPMChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventPMChangePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int reason ATTRIBUTE_UNUSED,
int reason G_GNUC_UNUSED,
void *opaque)
{
/* As long as libvirt.h doesn't define any reasons, we might as
......@@ -13224,7 +13224,7 @@ virshEventPMChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventBalloonChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventBalloonChangePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
unsigned long long actual,
void *opaque)
......@@ -13238,7 +13238,7 @@ virshEventBalloonChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventDeviceRemovedPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventDeviceRemovedPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *alias,
void *opaque)
......@@ -13252,7 +13252,7 @@ virshEventDeviceRemovedPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventDeviceAddedPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventDeviceAddedPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *alias,
void *opaque)
......@@ -13266,7 +13266,7 @@ virshEventDeviceAddedPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventTunablePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventTunablePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
......@@ -13304,7 +13304,7 @@ VIR_ENUM_IMPL(virshEventAgentLifecycleReason,
#define UNKNOWNSTR(str) (str ? str : N_("unsupported value"))
static void
virshEventAgentLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventAgentLifecyclePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int state,
int reason,
......@@ -13321,7 +13321,7 @@ virshEventAgentLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventMigrationIterationPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventMigrationIterationPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int iteration,
void *opaque)
......@@ -13337,7 +13337,7 @@ virshEventMigrationIterationPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
virshEventJobCompletedPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventJobCompletedPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
......@@ -13361,7 +13361,7 @@ virshEventJobCompletedPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
static void
virshEventDeviceRemovalFailedPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventDeviceRemovalFailedPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *alias,
void *opaque)
......@@ -13382,7 +13382,7 @@ VIR_ENUM_IMPL(virshEventMetadataChangeType,
N_("element"));
static void
virshEventMetadataChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventMetadataChangePrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
int type,
const char *nsuri,
......@@ -13399,7 +13399,7 @@ virshEventMetadataChangePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
static void
virshEventBlockThresholdPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
virshEventBlockThresholdPrint(virConnectPtr conn G_GNUC_UNUSED,
virDomainPtr dom,
const char *dev,
const char *path,
......
......@@ -50,7 +50,7 @@ static const vshCmdInfo info_capabilities[] = {
};
static bool
cmdCapabilities(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdCapabilities(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
char *caps;
virshControlPtr priv = ctl->privData;
......@@ -654,7 +654,7 @@ static const vshCmdInfo info_nodeinfo[] = {
};
static bool
cmdNodeinfo(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdNodeinfo(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
virNodeInfo info;
virshControlPtr priv = ctl->privData;
......@@ -699,7 +699,7 @@ static const vshCmdOptDef opts_node_cpumap[] = {
};
static bool
cmdNodeCpuMap(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdNodeCpuMap(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
int cpu, cpunum;
unsigned char *cpumap = NULL;
......@@ -1029,7 +1029,7 @@ static const vshCmdInfo info_sysinfo[] = {
};
static bool
cmdSysinfo(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdSysinfo(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
char *sysinfo;
virshControlPtr priv = ctl->privData;
......@@ -1060,7 +1060,7 @@ static const vshCmdInfo info_hostname[] = {
};
static bool
cmdHostname(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdHostname(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
char *hostname;
virshControlPtr priv = ctl->privData;
......@@ -1091,7 +1091,7 @@ static const vshCmdInfo info_uri[] = {
};
static bool
cmdURI(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdURI(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
char *uri;
virshControlPtr priv = ctl->privData;
......@@ -1409,7 +1409,7 @@ static const vshCmdOptDef opts_version[] = {
};
static bool
cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
unsigned long hvVersion;
const char *hvType;
......
......@@ -345,7 +345,7 @@ static const vshCmdOptDef opts_interface_list[] = {
};
static bool
cmdInterfaceList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdInterfaceList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
bool inactive = vshCommandOptBool(cmd, "inactive");
bool all = vshCommandOptBool(cmd, "all");
......@@ -695,7 +695,7 @@ static const vshCmdOptDef opts_interface_begin[] = {
};
static bool
cmdInterfaceBegin(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdInterfaceBegin(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
virshControlPtr priv = ctl->privData;
......@@ -726,7 +726,7 @@ static const vshCmdOptDef opts_interface_commit[] = {
};
static bool
cmdInterfaceCommit(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdInterfaceCommit(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
virshControlPtr priv = ctl->privData;
......@@ -757,7 +757,7 @@ static const vshCmdOptDef opts_interface_rollback[] = {
};
static bool
cmdInterfaceRollback(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdInterfaceRollback(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
virshControlPtr priv = ctl->privData;
......
......@@ -703,7 +703,7 @@ static const vshCmdOptDef opts_network_list[] = {
if (vshCommandOptBool(cmd, NAME)) \
flags |= (FLAG)
static bool
cmdNetworkList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdNetworkList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
virshNetworkListPtr list = NULL;
size_t i;
......@@ -1208,10 +1208,10 @@ VIR_ENUM_IMPL(virshNetworkEventId,
"lifecycle");
static void
vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUSED,
virNetworkPtr net,
int event,
int detail ATTRIBUTE_UNUSED,
int detail G_GNUC_UNUSED,
void *opaque)
{
virshNetEventData *data = opaque;
......
......@@ -382,7 +382,7 @@ static const vshCmdOptDef opts_node_list_devices[] = {
};
static bool
cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
const char *cap_str = NULL;
size_t i;
......@@ -780,10 +780,10 @@ struct virshNodeDeviceEventData {
typedef struct virshNodeDeviceEventData virshNodeDeviceEventData;
static void
vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUSED,
virNodeDevicePtr dev,
int event,
int detail ATTRIBUTE_UNUSED,
int detail G_GNUC_UNUSED,
void *opaque)
{
virshNodeDeviceEventData *data = opaque;
......@@ -811,7 +811,7 @@ vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
vshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventGenericPrint(virConnectPtr conn G_GNUC_UNUSED,
virNodeDevicePtr dev,
void *opaque)
{
......
......@@ -351,7 +351,7 @@ static const vshCmdOptDef opts_nwfilter_list[] = {
};
static bool
cmdNWFilterList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdNWFilterList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
size_t i;
char uuid[VIR_UUID_STRING_BUFLEN];
......@@ -716,7 +716,7 @@ static const vshCmdOptDef opts_nwfilter_binding_list[] = {
};
static bool
cmdNWFilterBindingList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdNWFilterBindingList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
size_t i;
bool ret = false;
......
......@@ -1114,7 +1114,7 @@ static const vshCmdOptDef opts_pool_list[] = {
};
static bool
cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdPoolList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
virStoragePoolInfo info;
size_t i;
......@@ -1445,7 +1445,7 @@ static const vshCmdOptDef opts_find_storage_pool_sources_as[] = {
};
static bool
cmdPoolDiscoverSourcesAs(vshControl * ctl, const vshCmd * cmd ATTRIBUTE_UNUSED)
cmdPoolDiscoverSourcesAs(vshControl * ctl, const vshCmd * cmd G_GNUC_UNUSED)
{
const char *type = NULL, *host = NULL;
char *srcSpec = NULL;
......@@ -1528,7 +1528,7 @@ static const vshCmdOptDef opts_find_storage_pool_sources[] = {
};
static bool
cmdPoolDiscoverSources(vshControl * ctl, const vshCmd * cmd ATTRIBUTE_UNUSED)
cmdPoolDiscoverSources(vshControl * ctl, const vshCmd * cmd G_GNUC_UNUSED)
{
const char *type = NULL, *srcSpecFile = NULL;
char *srcSpec = NULL, *srcList;
......@@ -1918,10 +1918,10 @@ typedef struct virshPoolEventData virshPoolEventData;
static void
vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUSED,
virStoragePoolPtr pool,
int event,
int detail ATTRIBUTE_UNUSED,
int detail G_GNUC_UNUSED,
void *opaque)
{
virshPoolEventData *data = opaque;
......@@ -1951,7 +1951,7 @@ vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
vshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventGenericPrint(virConnectPtr conn G_GNUC_UNUSED,
virStoragePoolPtr pool,
void *opaque)
{
......@@ -2126,7 +2126,7 @@ static const vshCmdOptDef opts_pool_capabilities[] = {
static bool
cmdPoolCapabilities(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED)
const vshCmd *cmd G_GNUC_UNUSED)
{
const unsigned int flags = 0; /* No flags so far */
virshControlPtr priv = ctl->privData;
......
......@@ -488,7 +488,7 @@ static const vshCmdOptDef opts_secret_list[] = {
};
static bool
cmdSecretList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdSecretList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
size_t i;
virshSecretListPtr list = NULL;
......@@ -579,10 +579,10 @@ struct virshSecretEventData {
typedef struct virshSecretEventData virshSecretEventData;
static void
vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventLifecyclePrint(virConnectPtr conn G_GNUC_UNUSED,
virSecretPtr secret,
int event,
int detail ATTRIBUTE_UNUSED,
int detail G_GNUC_UNUSED,
void *opaque)
{
virshSecretEventData *data = opaque;
......@@ -611,7 +611,7 @@ vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
}
static void
vshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
vshEventGenericPrint(virConnectPtr conn G_GNUC_UNUSED,
virSecretPtr secret,
void *opaque)
{
......
......@@ -141,7 +141,7 @@ virshDomainState(vshControl *ctl,
int
virshStreamSink(virStreamPtr st ATTRIBUTE_UNUSED,
virshStreamSink(virStreamPtr st G_GNUC_UNUSED,
const char *bytes,
size_t nbytes,
void *opaque)
......@@ -153,7 +153,7 @@ virshStreamSink(virStreamPtr st ATTRIBUTE_UNUSED,
int
virshStreamSource(virStreamPtr st ATTRIBUTE_UNUSED,
virshStreamSource(virStreamPtr st G_GNUC_UNUSED,
char *bytes,
size_t nbytes,
void *opaque)
......@@ -166,7 +166,7 @@ virshStreamSource(virStreamPtr st ATTRIBUTE_UNUSED,
int
virshStreamSourceSkip(virStreamPtr st ATTRIBUTE_UNUSED,
virshStreamSourceSkip(virStreamPtr st G_GNUC_UNUSED,
long long offset,
void *opaque)
{
......@@ -182,7 +182,7 @@ virshStreamSourceSkip(virStreamPtr st ATTRIBUTE_UNUSED,
int
virshStreamSkip(virStreamPtr st ATTRIBUTE_UNUSED,
virshStreamSkip(virStreamPtr st G_GNUC_UNUSED,
long long offset,
void *opaque)
{
......@@ -200,7 +200,7 @@ virshStreamSkip(virStreamPtr st ATTRIBUTE_UNUSED,
int
virshStreamInData(virStreamPtr st ATTRIBUTE_UNUSED,
virshStreamInData(virStreamPtr st G_GNUC_UNUSED,
int *inData,
long long *offset,
void *opaque)
......
......@@ -1376,7 +1376,7 @@ static const vshCmdOptDef opts_vol_list[] = {
};
static bool
cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdVolList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
virStorageVolInfo volumeInfo;
virStoragePoolPtr pool;
......
......@@ -392,7 +392,7 @@ virshInit(vshControl *ctl)
}
static void
virshDeinitTimer(int timer ATTRIBUTE_UNUSED, void *opaque ATTRIBUTE_UNUSED)
virshDeinitTimer(int timer G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED)
{
/* nothing to be done here */
}
......@@ -498,7 +498,7 @@ virshUsage(void)
* Show version and options compiled in
*/
static void
virshShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
virshShowVersion(vshControl *ctl G_GNUC_UNUSED)
{
/* FIXME - list a copyright blurb, as in GNU programs? */
vshPrint(ctl, _("Virsh command line tool of libvirt %s\n"), VERSION);
......
......@@ -29,7 +29,7 @@
char **
vshAdmServerCompleter(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED,
unsigned int flags)
{
vshAdmControlPtr priv = ctl->privData;
......
......@@ -112,7 +112,7 @@ vshAdmGetTimeStr(vshControl *ctl, time_t then, char **result)
* check if the communication channel has not been closed by remote party.
*/
static void
vshAdmCatchDisconnect(virAdmConnectPtr conn ATTRIBUTE_UNUSED,
vshAdmCatchDisconnect(virAdmConnectPtr conn G_GNUC_UNUSED,
int reason,
void *opaque)
{
......@@ -231,7 +231,7 @@ static const vshCmdInfo info_uri[] = {
};
static bool
cmdURI(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdURI(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
char *uri;
vshAdmControlPtr priv = ctl->privData;
......@@ -263,7 +263,7 @@ static const vshCmdInfo info_version[] = {
};
static bool
cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdVersion(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
unsigned long libVersion;
unsigned long long includeVersion;
......@@ -373,7 +373,7 @@ static const vshCmdInfo info_srv_list[] = {
};
static bool
cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdSrvList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
int nsrvs = 0;
size_t i;
......@@ -1168,7 +1168,7 @@ vshAdmInit(vshControl *ctl)
}
static void
vshAdmDeinitTimer(int timer ATTRIBUTE_UNUSED, void *opaque ATTRIBUTE_UNUSED)
vshAdmDeinitTimer(int timer G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED)
{
/* nothing to be done here */
}
......@@ -1256,7 +1256,7 @@ vshAdmUsage(void)
* Show version and options compiled in
*/
static void
vshAdmShowVersion(vshControl *ctl ATTRIBUTE_UNUSED)
vshAdmShowVersion(vshControl *ctl G_GNUC_UNUSED)
{
/* FIXME - list a copyright blurb, as in GNU programs? */
vshPrint(ctl, _("Virt-admin command line tool of libvirt %s\n"), VERSION);
......
......@@ -323,8 +323,8 @@ int virHostValidateCGroupControllers(const char *hvname,
return ret;
}
#else /* !__linux__ */
int virHostValidateCGroupControllers(const char *hvname ATTRIBUTE_UNUSED,
int controllers ATTRIBUTE_UNUSED,
int virHostValidateCGroupControllers(const char *hvname G_GNUC_UNUSED,
int controllers G_GNUC_UNUSED,
virHostValidateLevel level)
{
virHostMsgFail(level, "%s", "This platform does not support cgroups");
......
......@@ -144,8 +144,8 @@ show_version(void)
static void
hideErrorFunc(void *opaque ATTRIBUTE_UNUSED,
virErrorPtr err ATTRIBUTE_UNUSED)
hideErrorFunc(void *opaque G_GNUC_UNUSED,
virErrorPtr err G_GNUC_UNUSED)
{
}
......
......@@ -230,8 +230,8 @@ virErrorPtr last_error;
* Quieten libvirt until we're done with the command.
*/
void
vshErrorHandler(void *opaque ATTRIBUTE_UNUSED,
virErrorPtr error ATTRIBUTE_UNUSED)
vshErrorHandler(void *opaque G_GNUC_UNUSED,
virErrorPtr error G_GNUC_UNUSED)
{
virFreeError(last_error);
last_error = virSaveLastError();
......@@ -1026,7 +1026,7 @@ vshCommandOptULWrap(vshControl *ctl, const vshCmd *cmd,
* <0 in all other cases (@value untouched)
*/
int
vshCommandOptStringQuiet(vshControl *ctl ATTRIBUTE_UNUSED, const vshCmd *cmd,
vshCommandOptStringQuiet(vshControl *ctl G_GNUC_UNUSED, const vshCmd *cmd,
const char *name, const char **value)
{
vshCmdOpt *arg;
......@@ -1245,7 +1245,7 @@ vshCommandOptBool(const vshCmd *cmd, const char *name)
* list of supported options in CMD->def->opts.
*/
const vshCmdOpt *
vshCommandOptArgv(vshControl *ctl ATTRIBUTE_UNUSED, const vshCmd *cmd,
vshCommandOptArgv(vshControl *ctl G_GNUC_UNUSED, const vshCmd *cmd,
const vshCmdOpt *opt)
{
opt = opt ? opt->next : cmd->opts;
......@@ -1645,7 +1645,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser, vshCmd **partial)
static vshCommandToken ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
vshCommandArgvGetArg(vshControl *ctl, vshCommandParser *parser, char **res,
bool report ATTRIBUTE_UNUSED)
bool report G_GNUC_UNUSED)
{
if (parser->arg_pos == parser->arg_end) {
*res = NULL;
......@@ -1897,7 +1897,7 @@ vshPrintExtra(vshControl *ctl, const char *format, ...)
void
vshPrint(vshControl *ctl ATTRIBUTE_UNUSED, const char *format, ...)
vshPrint(vshControl *ctl G_GNUC_UNUSED, const char *format, ...)
{
va_list ap;
char *str;
......@@ -1912,8 +1912,8 @@ vshPrint(vshControl *ctl ATTRIBUTE_UNUSED, const char *format, ...)
bool
vshTTYIsInterruptCharacter(vshControl *ctl ATTRIBUTE_UNUSED,
const char chr ATTRIBUTE_UNUSED)
vshTTYIsInterruptCharacter(vshControl *ctl G_GNUC_UNUSED,
const char chr G_GNUC_UNUSED)
{
#ifndef WIN32
if (ctl->istty &&
......@@ -1933,7 +1933,7 @@ vshTTYAvailable(vshControl *ctl)
int
vshTTYDisableInterrupt(vshControl *ctl ATTRIBUTE_UNUSED)
vshTTYDisableInterrupt(vshControl *ctl G_GNUC_UNUSED)
{
#ifndef WIN32
struct termios termset = ctl->termattr;
......@@ -1957,7 +1957,7 @@ vshTTYDisableInterrupt(vshControl *ctl ATTRIBUTE_UNUSED)
int
vshTTYRestore(vshControl *ctl ATTRIBUTE_UNUSED)
vshTTYRestore(vshControl *ctl G_GNUC_UNUSED)
{
#ifndef WIN32
if (!ctl->istty)
......@@ -1987,8 +1987,8 @@ cfmakeraw(struct termios *attr)
int
vshTTYMakeRaw(vshControl *ctl ATTRIBUTE_UNUSED,
bool report_errors ATTRIBUTE_UNUSED)
vshTTYMakeRaw(vshControl *ctl G_GNUC_UNUSED,
bool report_errors G_GNUC_UNUSED)
{
#ifndef WIN32
struct termios rawattr = ctl->termattr;
......@@ -2079,9 +2079,9 @@ static struct sigaction vshEventOldAction;
/* Signal handler installed in vshEventStart, removed in vshEventCleanup. */
static void
vshEventInt(int sig ATTRIBUTE_UNUSED,
siginfo_t *siginfo ATTRIBUTE_UNUSED,
void *context ATTRIBUTE_UNUSED)
vshEventInt(int sig G_GNUC_UNUSED,
siginfo_t *siginfo G_GNUC_UNUSED,
void *context G_GNUC_UNUSED)
{
char reason = VSH_EVENT_INTERRUPT;
if (vshEventFd >= 0)
......@@ -2091,7 +2091,7 @@ vshEventInt(int sig ATTRIBUTE_UNUSED,
/* Event loop handler used to limit length of waiting for any other event. */
void
vshEventTimeout(int timer ATTRIBUTE_UNUSED,
vshEventTimeout(int timer G_GNUC_UNUSED,
void *opaque)
{
vshControl *ctl = opaque;
......@@ -2410,8 +2410,8 @@ vshAskReedit(vshControl *ctl, const char *msg, bool relax_avail)
#else /* WIN32 */
int
vshAskReedit(vshControl *ctl,
const char *msg ATTRIBUTE_UNUSED,
bool relax_avail ATTRIBUTE_UNUSED)
const char *msg G_GNUC_UNUSED,
bool relax_avail G_GNUC_UNUSED)
{
vshDebug(ctl, VSH_ERR_WARNING, "%s", _("This function is not "
"supported on WIN32 platform"));
......@@ -2907,8 +2907,8 @@ vshReadlineParse(const char *text, int state)
static char **
vshReadlineCompletion(const char *text,
int start ATTRIBUTE_UNUSED,
int end ATTRIBUTE_UNUSED)
int start G_GNUC_UNUSED,
int end G_GNUC_UNUSED)
{
char **matches = (char **) NULL;
......@@ -3017,7 +3017,7 @@ vshReadlineDeinit(vshControl *ctl)
}
char *
vshReadline(vshControl *ctl ATTRIBUTE_UNUSED, const char *prompt)
vshReadline(vshControl *ctl G_GNUC_UNUSED, const char *prompt)
{
return readline(prompt);
}
......@@ -3025,14 +3025,14 @@ vshReadline(vshControl *ctl ATTRIBUTE_UNUSED, const char *prompt)
#else /* !WITH_READLINE */
static int
vshReadlineInit(vshControl *ctl ATTRIBUTE_UNUSED)
vshReadlineInit(vshControl *ctl G_GNUC_UNUSED)
{
/* empty */
return 0;
}
static void
vshReadlineDeinit(vshControl *ctl ATTRIBUTE_UNUSED)
vshReadlineDeinit(vshControl *ctl G_GNUC_UNUSED)
{
/* empty */
}
......@@ -3380,7 +3380,7 @@ const vshCmdInfo info_pwd[] = {
};
bool
cmdPwd(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdPwd(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
char *cwd;
bool ret = true;
......@@ -3410,7 +3410,7 @@ const vshCmdInfo info_quit[] = {
};
bool
cmdQuit(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdQuit(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
{
ctl->imode = false;
return true;
......@@ -3435,7 +3435,7 @@ const vshCmdInfo info_selftest[] = {
* the per-command options structure. */
bool
cmdSelfTest(vshControl *ctl,
const vshCmd *cmd ATTRIBUTE_UNUSED)
const vshCmd *cmd G_GNUC_UNUSED)
{
const vshCmdGrp *grp;
const vshCmdDef *def;
......@@ -3538,8 +3538,8 @@ cmdComplete(vshControl *ctl, const vshCmd *cmd)
bool
cmdComplete(vshControl *ctl ATTRIBUTE_UNUSED,
const vshCmd *cmd ATTRIBUTE_UNUSED)
cmdComplete(vshControl *ctl G_GNUC_UNUSED,
const vshCmd *cmd G_GNUC_UNUSED)
{
return false;
}
......
......@@ -443,7 +443,7 @@ dissect_libvirt_payload(tvbuff_t *tvb, proto_tree *tree,
static int
dissect_libvirt_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *opaque ATTRIBUTE_UNUSED)
void *opaque G_GNUC_UNUSED)
{
goffset offset;
guint32 prog, proc, type, serial, status;
......@@ -508,14 +508,14 @@ dissect_libvirt_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
static guint
get_message_len(packet_info *pinfo ATTRIBUTE_UNUSED, tvbuff_t *tvb, int offset, void *data ATTRIBUTE_UNUSED)
get_message_len(packet_info *pinfo G_GNUC_UNUSED, tvbuff_t *tvb, int offset, void *data G_GNUC_UNUSED)
{
return tvb_get_ntohl(tvb, offset);
}
static int
dissect_libvirt(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data ATTRIBUTE_UNUSED)
proto_tree *tree, void *data G_GNUC_UNUSED)
{
/* Another magic const - 4; simply, how much bytes
* is needed to tell the length of libvirt packet. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册