Use G_GNUC_UNUSED everywhere

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 adfa096bf2
commit 059cf394ce
10 changed files with 83 additions and 83 deletions

View File

@ -118,7 +118,7 @@ hypervInitConnection(virConnectPtr conn, hypervPrivate *priv,
static virDrvOpenStatus
hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
virConfPtr conf ATTRIBUTE_UNUSED,
virConfPtr conf G_GNUC_UNUSED,
unsigned int flags)
{
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
@ -194,7 +194,7 @@ hypervConnectClose(virConnectPtr conn)
static const char *
hypervConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
hypervConnectGetType(virConnectPtr conn G_GNUC_UNUSED)
{
return "Hyper-V";
}
@ -598,7 +598,7 @@ hypervDomainDestroy(virDomainPtr domain)
static char *
hypervDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
hypervDomainGetOSType(virDomainPtr domain G_GNUC_UNUSED)
{
char *osType;
@ -1100,7 +1100,7 @@ hypervDomainIsActive(virDomainPtr domain)
static int
hypervDomainIsPersistent(virDomainPtr domain ATTRIBUTE_UNUSED)
hypervDomainIsPersistent(virDomainPtr domain G_GNUC_UNUSED)
{
/* Hyper-V has no concept of transient domains, so all of them are persistent */
return 1;
@ -1109,7 +1109,7 @@ hypervDomainIsPersistent(virDomainPtr domain ATTRIBUTE_UNUSED)
static int
hypervDomainIsUpdated(virDomainPtr domain ATTRIBUTE_UNUSED)
hypervDomainIsUpdated(virDomainPtr domain G_GNUC_UNUSED)
{
return 0;
}
@ -1607,7 +1607,7 @@ static virHypervisorDriver hypervHypervisorDriver = {
static void
hypervDebugHandler(const char *message, debug_level_e level,
void *user_data ATTRIBUTE_UNUSED)
void *user_data G_GNUC_UNUSED)
{
switch (level) {
case DEBUG_LEVEL_ERROR:

View File

@ -1127,7 +1127,7 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
}
void
hypervFreeObject(hypervPrivate *priv ATTRIBUTE_UNUSED, hypervObject *object)
hypervFreeObject(hypervPrivate *priv G_GNUC_UNUSED, hypervObject *object)
{
hypervObject *next;
#if WS_SERIALIZER_FREE_MEM_WORKS

View File

@ -89,8 +89,8 @@ virNetcfDriverStateDispose(void *obj)
static int
netcfStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
virStateInhibitCallback callback G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED)
{
if (virNetcfDriverStateInitialize() < 0)
return VIR_DRV_STATE_INIT_ERROR;
@ -188,8 +188,8 @@ netcfStateReload(void)
static virDrvOpenStatus
netcfConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
virConfPtr conf ATTRIBUTE_UNUSED,
virConnectAuthPtr auth G_GNUC_UNUSED,
virConfPtr conf G_GNUC_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -211,27 +211,27 @@ netcfConnectOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int netcfConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static int netcfConnectClose(virConnectPtr conn G_GNUC_UNUSED)
{
return 0;
}
static int netcfConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int netcfConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int netcfConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int netcfConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;
}
static int netcfConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int netcfConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
{
return 1;
}

View File

@ -920,8 +920,8 @@ udevGetIfaceDefBridge(struct udev *udev,
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT
udevGetIfaceDefVlan(struct udev *udev ATTRIBUTE_UNUSED,
struct udev_device *dev ATTRIBUTE_UNUSED,
udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED,
struct udev_device *dev G_GNUC_UNUSED,
const char *name,
virInterfaceDef *ifacedef)
{
@ -1169,8 +1169,8 @@ udevStateCleanup(void);
static int
udevStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
virStateInhibitCallback callback G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED)
{
int ret = VIR_DRV_STATE_INIT_ERROR;
@ -1238,8 +1238,8 @@ udevStateCleanup(void)
static virDrvOpenStatus
udevConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
virConfPtr conf ATTRIBUTE_UNUSED,
virConnectAuthPtr auth G_GNUC_UNUSED,
virConfPtr conf G_GNUC_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -1261,27 +1261,27 @@ udevConnectOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int udevConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static int udevConnectClose(virConnectPtr conn G_GNUC_UNUSED)
{
return 0;
}
static int udevConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int udevConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int udevConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int udevConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;
}
static int udevConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int udevConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
{
return 1;
}

View File

@ -113,7 +113,7 @@ static virNWFilterDriverPtr virSharedNWFilterDriver;
static int
virConnectAuthCallbackDefault(virConnectCredentialPtr cred,
unsigned int ncred,
void *cbdata ATTRIBUTE_UNUSED)
void *cbdata G_GNUC_UNUSED)
{
size_t i;
@ -354,9 +354,9 @@ BOOL WINAPI
DllMain(HINSTANCE instance, DWORD reason, LPVOID ignore);
BOOL WINAPI
DllMain(HINSTANCE instance ATTRIBUTE_UNUSED,
DllMain(HINSTANCE instance G_GNUC_UNUSED,
DWORD reason,
LPVOID ignore ATTRIBUTE_UNUSED)
LPVOID ignore G_GNUC_UNUSED)
{
switch (reason) {
case DLL_PROCESS_ATTACH:
@ -772,7 +772,7 @@ virStateStop(void)
* @typeVer have the format major * 1,000,000 + minor * 1,000 + release.
*/
int
virGetVersion(unsigned long *libVer, const char *type ATTRIBUTE_UNUSED,
virGetVersion(unsigned long *libVer, const char *type G_GNUC_UNUSED,
unsigned long *typeVer)
{
if (virInitialize() < 0)

View File

@ -1070,23 +1070,23 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
static int
phypDomainDefPostParse(virDomainDefPtr def ATTRIBUTE_UNUSED,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
phypDomainDefPostParse(virDomainDefPtr def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
return 0;
}
static int
phypDomainDeviceDefPostParse(virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
const virDomainDef *def ATTRIBUTE_UNUSED,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
phypDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
return 0;
}
@ -1102,7 +1102,7 @@ virDomainDefParserConfig virPhypDriverDomainDefParserConfig = {
static virDrvOpenStatus
phypConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth,
virConfPtr conf ATTRIBUTE_UNUSED,
virConfPtr conf G_GNUC_UNUSED,
unsigned int flags)
{
LIBSSH2_SESSION *session = NULL;
@ -1223,7 +1223,7 @@ phypConnectClose(virConnectPtr conn)
static int
phypConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
phypConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
{
/* Phyp uses an SSH tunnel, so is always encrypted */
return 1;
@ -1231,7 +1231,7 @@ phypConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
phypConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
phypConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
{
/* Phyp uses an SSH tunnel, so is always secure */
return 1;
@ -1254,7 +1254,7 @@ phypConnectIsAlive(virConnectPtr conn)
static int
phypDomainIsUpdated(virDomainPtr conn ATTRIBUTE_UNUSED)
phypDomainIsUpdated(virDomainPtr conn G_GNUC_UNUSED)
{
return 0;
}
@ -1420,7 +1420,7 @@ phypGetRemoteSlot(virConnectPtr conn, const char *managed_system,
/* XXX - is this needed? */
static char *phypGetBackingDevice(virConnectPtr, const char *, char *)
ATTRIBUTE_UNUSED;
G_GNUC_UNUSED;
static char *
phypGetBackingDevice(virConnectPtr conn, const char *managed_system,
char *lpar_name)
@ -3059,7 +3059,7 @@ phypGetLparState(virConnectPtr conn, unsigned int lpar_id)
}
/* XXX - is this needed? */
static int phypDiskType(virConnectPtr, char *) ATTRIBUTE_UNUSED;
static int phypDiskType(virConnectPtr, char *) G_GNUC_UNUSED;
static int
phypDiskType(virConnectPtr conn, char *backing_device)
{

View File

@ -452,8 +452,8 @@ secretStateCleanup(void)
static int
secretStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
virStateInhibitCallback callback G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED)
{
if (VIR_ALLOC(driver) < 0)
return VIR_DRV_STATE_INIT_ERROR;
@ -539,8 +539,8 @@ secretStateReload(void)
static virDrvOpenStatus
secretConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
virConfPtr conf ATTRIBUTE_UNUSED,
virConnectAuthPtr auth G_GNUC_UNUSED,
virConfPtr conf G_GNUC_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@ -562,27 +562,27 @@ secretConnectOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int secretConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static int secretConnectClose(virConnectPtr conn G_GNUC_UNUSED)
{
return 0;
}
static int secretConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int secretConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int secretConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int secretConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;
}
static int secretConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int secretConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
{
return 1;
}

View File

@ -537,7 +537,7 @@ vmwareExtractPid(const char * vmxPath)
}
char *
vmwareCopyVMXFileName(const char *datastorePath, void *opaque ATTRIBUTE_UNUSED)
vmwareCopyVMXFileName(const char *datastorePath, void *opaque G_GNUC_UNUSED)
{
char *path;

View File

@ -93,7 +93,7 @@ vmwareDomObjFromDomain(struct vmware_driver *driver,
static void *
vmwareDataAllocFunc(void *opaque ATTRIBUTE_UNUSED)
vmwareDataAllocFunc(void *opaque G_GNUC_UNUSED)
{
vmwareDomainPtr dom;
@ -116,22 +116,22 @@ vmwareDataFreeFunc(void *data)
}
static int
vmwareDomainDefPostParse(virDomainDefPtr def ATTRIBUTE_UNUSED,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
vmwareDomainDefPostParse(virDomainDefPtr def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
return 0;
}
static int
vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
const virDomainDef *def ATTRIBUTE_UNUSED,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
return 0;
}
@ -153,8 +153,8 @@ vmwareDomainXMLConfigInit(void)
static virDrvOpenStatus
vmwareConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
virConfPtr conf ATTRIBUTE_UNUSED,
virConnectAuthPtr auth G_GNUC_UNUSED,
virConfPtr conf G_GNUC_UNUSED,
unsigned int flags)
{
struct vmware_driver *driver;
@ -258,7 +258,7 @@ vmwareConnectClose(virConnectPtr conn)
}
static const char *
vmwareConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
vmwareConnectGetType(virConnectPtr conn G_GNUC_UNUSED)
{
return "VMware";
}
@ -1103,7 +1103,7 @@ vmwareDomainGetState(virDomainPtr dom,
}
static int
vmwareConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
vmwareConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
{
return 1;
}

View File

@ -529,22 +529,22 @@ VIR_ENUM_IMPL(virVMXControllerModelSCSI,
*/
static int
virVMXDomainDefPostParse(virDomainDefPtr def ATTRIBUTE_UNUSED,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
virVMXDomainDefPostParse(virDomainDefPtr def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
return 0;
}
static int
virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
const virDomainDef *def ATTRIBUTE_UNUSED,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
return 0;
}
@ -1238,7 +1238,7 @@ struct virVMXConfigScanResults {
static int
virVMXConfigScanResultsCollector(const char* name,
virConfValuePtr value ATTRIBUTE_UNUSED,
virConfValuePtr value G_GNUC_UNUSED,
void *opaque)
{
struct virVMXConfigScanResults *results = opaque;