test: 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 cdf7be47c0
commit 7c655468e8
1 changed files with 40 additions and 40 deletions

View File

@ -1441,7 +1441,7 @@ testDriverCloseInternal(testDriverPtr driver)
static virDrvOpenStatus static virDrvOpenStatus
testConnectOpen(virConnectPtr conn, testConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth, virConnectAuthPtr auth,
virConfPtr conf ATTRIBUTE_UNUSED, virConfPtr conf G_GNUC_UNUSED,
unsigned int flags) unsigned int flags)
{ {
int ret; int ret;
@ -1484,42 +1484,42 @@ testConnectClose(virConnectPtr conn)
} }
static int testConnectGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, static int testConnectGetVersion(virConnectPtr conn G_GNUC_UNUSED,
unsigned long *hvVer) unsigned long *hvVer)
{ {
*hvVer = 2; *hvVer = 2;
return 0; return 0;
} }
static char *testConnectGetHostname(virConnectPtr conn ATTRIBUTE_UNUSED) static char *testConnectGetHostname(virConnectPtr conn G_GNUC_UNUSED)
{ {
return virGetHostname(); return virGetHostname();
} }
static int testConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED) static int testConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
{ {
return 1; return 1;
} }
static int testConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED) static int testConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
{ {
return 0; return 0;
} }
static int testConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED) static int testConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
{ {
return 1; return 1;
} }
static int testConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, static int testConnectGetMaxVcpus(virConnectPtr conn G_GNUC_UNUSED,
const char *type ATTRIBUTE_UNUSED) const char *type G_GNUC_UNUSED)
{ {
return 32; return 32;
} }
static char * static char *
testConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED, testConnectBaselineCPU(virConnectPtr conn G_GNUC_UNUSED,
const char **xmlCPUs, const char **xmlCPUs,
unsigned int ncpus, unsigned int ncpus,
unsigned int flags) unsigned int flags)
@ -1570,7 +1570,7 @@ static char *testConnectGetCapabilities(virConnectPtr conn)
} }
static char * static char *
testConnectGetSysinfo(virConnectPtr conn ATTRIBUTE_UNUSED, testConnectGetSysinfo(virConnectPtr conn G_GNUC_UNUSED,
unsigned int flags) unsigned int flags)
{ {
char *ret; char *ret;
@ -1590,14 +1590,14 @@ testConnectGetSysinfo(virConnectPtr conn ATTRIBUTE_UNUSED,
} }
static const char * static const char *
testConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED) testConnectGetType(virConnectPtr conn G_GNUC_UNUSED)
{ {
return "TEST"; return "TEST";
} }
static int static int
testConnectSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED, testConnectSupportsFeature(virConnectPtr conn G_GNUC_UNUSED,
int feature) int feature)
{ {
switch ((virDrvFeature) feature) { switch ((virDrvFeature) feature) {
@ -1662,7 +1662,7 @@ static int testDomainIsPersistent(virDomainPtr dom)
return ret; return ret;
} }
static int testDomainIsUpdated(virDomainPtr dom ATTRIBUTE_UNUSED) static int testDomainIsUpdated(virDomainPtr dom G_GNUC_UNUSED)
{ {
return 0; return 0;
} }
@ -1723,8 +1723,8 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
static virDomainPtr static virDomainPtr
testDomainCreateXMLWithFiles(virConnectPtr conn, testDomainCreateXMLWithFiles(virConnectPtr conn,
const char *xml, const char *xml,
unsigned int nfiles ATTRIBUTE_UNUSED, unsigned int nfiles G_GNUC_UNUSED,
int *files ATTRIBUTE_UNUSED, int *files G_GNUC_UNUSED,
unsigned int flags) unsigned int flags)
{ {
return testDomainCreateXML(conn, xml, flags); return testDomainCreateXML(conn, xml, flags);
@ -2557,7 +2557,7 @@ testDomainCoreDump(virDomainPtr domain,
static char * static char *
testDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) testDomainGetOSType(virDomainPtr dom G_GNUC_UNUSED)
{ {
char *ret; char *ret;
@ -2567,8 +2567,8 @@ testDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED)
static int static int
testDomainGetLaunchSecurityInfo(virDomainPtr domain ATTRIBUTE_UNUSED, testDomainGetLaunchSecurityInfo(virDomainPtr domain G_GNUC_UNUSED,
virTypedParameterPtr *params ATTRIBUTE_UNUSED, virTypedParameterPtr *params G_GNUC_UNUSED,
int *nparams, int *nparams,
unsigned int flags) unsigned int flags)
{ {
@ -2898,8 +2898,8 @@ testDomainSetVcpusFlags(virDomainPtr domain, unsigned int nrCpus,
static int static int
testDomainSetUserPassword(virDomainPtr dom, testDomainSetUserPassword(virDomainPtr dom,
const char *user ATTRIBUTE_UNUSED, const char *user G_GNUC_UNUSED,
const char *password ATTRIBUTE_UNUSED, const char *password G_GNUC_UNUSED,
unsigned int flags) unsigned int flags)
{ {
int ret = -1; int ret = -1;
@ -4282,8 +4282,8 @@ static int testNodeGetCellsFreeMemory(virConnectPtr conn,
#define TEST_NB_CPU_STATS 4 #define TEST_NB_CPU_STATS 4
static int static int
testNodeGetCPUStats(virConnectPtr conn ATTRIBUTE_UNUSED, testNodeGetCPUStats(virConnectPtr conn G_GNUC_UNUSED,
int cpuNum ATTRIBUTE_UNUSED, int cpuNum G_GNUC_UNUSED,
virNodeCPUStatsPtr params, virNodeCPUStatsPtr params,
int *nparams, int *nparams,
unsigned int flags) unsigned int flags)
@ -4343,10 +4343,10 @@ testNodeGetFreeMemory(virConnectPtr conn)
} }
static int static int
testNodeGetFreePages(virConnectPtr conn ATTRIBUTE_UNUSED, testNodeGetFreePages(virConnectPtr conn G_GNUC_UNUSED,
unsigned int npages, unsigned int npages,
unsigned int *pages ATTRIBUTE_UNUSED, unsigned int *pages G_GNUC_UNUSED,
int startCell ATTRIBUTE_UNUSED, int startCell G_GNUC_UNUSED,
unsigned int cellCount, unsigned int cellCount,
unsigned long long *counts, unsigned long long *counts,
unsigned int flags) unsigned int flags)
@ -4410,8 +4410,8 @@ static int testDomainCreate(virDomainPtr domain)
static int testDomainCreateWithFiles(virDomainPtr domain, static int testDomainCreateWithFiles(virDomainPtr domain,
unsigned int nfiles ATTRIBUTE_UNUSED, unsigned int nfiles G_GNUC_UNUSED,
int *files ATTRIBUTE_UNUSED, int *files G_GNUC_UNUSED,
unsigned int flags) unsigned int flags)
{ {
return testDomainCreateWithFlags(domain, flags); return testDomainCreateWithFlags(domain, flags);
@ -4607,7 +4607,7 @@ testDomainFSThaw(virDomainPtr dom,
static int static int
testDomainFSTrim(virDomainPtr dom, testDomainFSTrim(virDomainPtr dom,
const char *mountPoint, const char *mountPoint,
unsigned long long minimum ATTRIBUTE_UNUSED, unsigned long long minimum G_GNUC_UNUSED,
unsigned int flags) unsigned int flags)
{ {
virDomainObjPtr vm; virDomainObjPtr vm;
@ -4881,7 +4881,7 @@ testDomainGetPerfEvents(virDomainPtr dom,
} }
static char *testDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED, static char *testDomainGetSchedulerType(virDomainPtr domain G_GNUC_UNUSED,
int *nparams) int *nparams)
{ {
char *type = NULL; char *type = NULL;
@ -6340,7 +6340,7 @@ testStoragePoolCreate(virStoragePoolPtr pool,
static char * static char *
testConnectFindStoragePoolSources(virConnectPtr conn ATTRIBUTE_UNUSED, testConnectFindStoragePoolSources(virConnectPtr conn G_GNUC_UNUSED,
const char *type, const char *type,
const char *srcSpec, const char *srcSpec,
unsigned int flags) unsigned int flags)
@ -6575,8 +6575,8 @@ testStoragePoolBuild(virStoragePoolPtr pool,
static int static int
testDestroyVport(testDriverPtr privconn, testDestroyVport(testDriverPtr privconn,
const char *wwnn ATTRIBUTE_UNUSED, const char *wwnn G_GNUC_UNUSED,
const char *wwpn ATTRIBUTE_UNUSED) const char *wwpn G_GNUC_UNUSED)
{ {
virNodeDeviceObjPtr obj = NULL; virNodeDeviceObjPtr obj = NULL;
virObjectEventPtr event = NULL; virObjectEventPtr event = NULL;
@ -7790,7 +7790,7 @@ static int testConnectListAllDomains(virConnectPtr conn,
} }
static int static int
testNodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED, testNodeGetCPUMap(virConnectPtr conn G_GNUC_UNUSED,
unsigned char **cpumap, unsigned char **cpumap,
unsigned int *online, unsigned int *online,
unsigned int flags) unsigned int flags)
@ -7810,9 +7810,9 @@ testNodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED,
} }
static char * static char *
testDomainScreenshot(virDomainPtr dom ATTRIBUTE_UNUSED, testDomainScreenshot(virDomainPtr dom G_GNUC_UNUSED,
virStreamPtr st, virStreamPtr st,
unsigned int screen ATTRIBUTE_UNUSED, unsigned int screen G_GNUC_UNUSED,
unsigned int flags) unsigned int flags)
{ {
char *ret = NULL; char *ret = NULL;
@ -7855,7 +7855,7 @@ testDomainInjectNMI(virDomainPtr domain,
static int static int
testDomainSendKey(virDomainPtr domain, testDomainSendKey(virDomainPtr domain,
unsigned int codeset, unsigned int codeset,
unsigned int holdtime ATTRIBUTE_UNUSED, unsigned int holdtime G_GNUC_UNUSED,
unsigned int *keycodes, unsigned int *keycodes,
int nkeycodes, int nkeycodes,
unsigned int flags) unsigned int flags)
@ -7891,7 +7891,7 @@ testDomainSendKey(virDomainPtr domain,
static int static int
testConnectGetCPUModelNames(virConnectPtr conn ATTRIBUTE_UNUSED, testConnectGetCPUModelNames(virConnectPtr conn G_GNUC_UNUSED,
const char *archName, const char *archName,
char ***models, char ***models,
unsigned int flags) unsigned int flags)
@ -8672,7 +8672,7 @@ struct _testMomentRemoveData {
static int static int
testDomainSnapshotDiscardAll(void *payload, testDomainSnapshotDiscardAll(void *payload,
const void *name ATTRIBUTE_UNUSED, const void *name G_GNUC_UNUSED,
void *data) void *data)
{ {
virDomainMomentObjPtr snap = payload; virDomainMomentObjPtr snap = payload;
@ -8692,7 +8692,7 @@ struct _testMomentReparentData {
static int static int
testDomainMomentReparentChildren(void *payload, testDomainMomentReparentChildren(void *payload,
const void *name ATTRIBUTE_UNUSED, const void *name G_GNUC_UNUSED,
void *data) void *data)
{ {
virDomainMomentObjPtr moment = payload; virDomainMomentObjPtr moment = payload;
@ -8989,7 +8989,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
static int static int
testDomainCheckpointDiscardAll(void *payload, testDomainCheckpointDiscardAll(void *payload,
const void *name ATTRIBUTE_UNUSED, const void *name G_GNUC_UNUSED,
void *data) void *data)
{ {
virDomainMomentObjPtr chk = payload; virDomainMomentObjPtr chk = payload;