bhyve: 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 cf4befa1c3
commit db7b6172a4
7 changed files with 32 additions and 32 deletions

View File

@ -286,7 +286,7 @@ bhyveBuildUSBControllerArgStr(const virDomainDef *def,
}
static int
bhyveBuildVirtIODiskArgStr(const virDomainDef *def ATTRIBUTE_UNUSED,
bhyveBuildVirtIODiskArgStr(const virDomainDef *def G_GNUC_UNUSED,
virDomainDiskDefPtr disk,
virCommandPtr cmd)
{
@ -319,7 +319,7 @@ bhyveBuildVirtIODiskArgStr(const virDomainDef *def ATTRIBUTE_UNUSED,
}
static int
bhyveBuildLPCArgStr(const virDomainDef *def ATTRIBUTE_UNUSED,
bhyveBuildLPCArgStr(const virDomainDef *def G_GNUC_UNUSED,
virCommandPtr cmd)
{
virCommandAddArgList(cmd, "-s", "1,lpc", NULL);
@ -643,7 +643,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn,
}
virCommandPtr
virBhyveProcessBuildDestroyCmd(bhyveConnPtr driver ATTRIBUTE_UNUSED,
virBhyveProcessBuildDestroyCmd(bhyveConnPtr driver G_GNUC_UNUSED,
virDomainDefPtr def)
{
virCommandPtr cmd = virCommandNew(BHYVECTL);

View File

@ -31,8 +31,8 @@
VIR_LOG_INIT("bhyve.bhyve_device");
static int
bhyveCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
virDomainDeviceDefPtr device ATTRIBUTE_UNUSED,
bhyveCollectPCIAddress(virDomainDefPtr def G_GNUC_UNUSED,
virDomainDeviceDefPtr device G_GNUC_UNUSED,
virDomainDeviceInfoPtr info,
void *opaque)
{

View File

@ -32,7 +32,7 @@
VIR_LOG_INIT("bhyve.bhyve_domain");
static void *
bhyveDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
bhyveDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
{
bhyveDomainObjPrivatePtr priv;
@ -74,10 +74,10 @@ bhyveDomainDefNeedsISAController(virDomainDefPtr def)
static int
bhyveDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
/* Add an implicit PCI root controller */
if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
@ -90,7 +90,7 @@ bhyveDomainDefPostParse(virDomainDefPtr def,
static int
bhyveDomainDiskDefAssignAddress(bhyveConnPtr driver,
virDomainDiskDefPtr def,
const virDomainDef *vmdef ATTRIBUTE_UNUSED)
const virDomainDef *vmdef G_GNUC_UNUSED)
{
int idx = virDiskNameToIndex(def->dst);
@ -122,10 +122,10 @@ bhyveDomainDiskDefAssignAddress(bhyveConnPtr driver,
static int
bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque,
void *parseOpaque ATTRIBUTE_UNUSED)
void *parseOpaque G_GNUC_UNUSED)
{
bhyveConnPtr driver = opaque;
@ -156,10 +156,10 @@ bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
static int
bhyveDomainDefAssignAddresses(virDomainDef *def,
virCapsPtr caps ATTRIBUTE_UNUSED,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED,
void *parseOpaque ATTRIBUTE_UNUSED)
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
if (bhyveDomainAssignAddresses(def, NULL) < 0)
return -1;

View File

@ -191,8 +191,8 @@ bhyveConnectURIProbe(char **uri)
static virDrvOpenStatus
bhyveConnectOpen(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);
@ -1049,7 +1049,7 @@ bhyveDomainShutdown(virDomainPtr dom)
static int
bhyveDomainOpenConsole(virDomainPtr dom,
const char *dev_name ATTRIBUTE_UNUSED,
const char *dev_name G_GNUC_UNUSED,
virStreamPtr st,
unsigned int flags)
{
@ -1215,8 +1215,8 @@ bhyveStateCleanup(void)
static int
bhyveStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
virStateInhibitCallback callback G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED)
{
bool autostart = true;
@ -1550,20 +1550,20 @@ bhyveConnectGetType(virConnectPtr conn)
return "BHYVE";
}
static int bhyveConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int bhyveConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
{
return 1;
}
static int
bhyveConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
bhyveConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int
bhyveConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
bhyveConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;

View File

@ -44,7 +44,7 @@ struct _bhyveMonitor {
};
static void
bhyveMonitorIO(int watch, int kq, int events ATTRIBUTE_UNUSED, void *opaque)
bhyveMonitorIO(int watch, int kq, int events G_GNUC_UNUSED, void *opaque)
{
const struct timespec zerowait = { 0, 0 };
virDomainObjPtr vm = opaque;

View File

@ -263,7 +263,7 @@ bhyveCommandLineToArgv(const char *nativeConfig,
static int
bhyveParseBhyveLPCArg(virDomainDefPtr def,
unsigned caps ATTRIBUTE_UNUSED,
unsigned caps G_GNUC_UNUSED,
const char *arg)
{
/* -l emulation[,config] */
@ -414,7 +414,7 @@ bhyveParsePCISlot(const char *slotdef,
static int
bhyveParsePCIDisk(virDomainDefPtr def,
unsigned caps ATTRIBUTE_UNUSED,
unsigned caps G_GNUC_UNUSED,
unsigned pcislot,
unsigned pcibus,
unsigned function,
@ -487,7 +487,7 @@ bhyveParsePCIDisk(virDomainDefPtr def,
static int
bhyveParsePCINet(virDomainDefPtr def,
virDomainXMLOptionPtr xmlopt,
unsigned caps ATTRIBUTE_UNUSED,
unsigned caps G_GNUC_UNUSED,
unsigned pcislot,
unsigned pcibus,
unsigned function,
@ -843,7 +843,7 @@ bhyveParseBhyveLoadCommandLine(virDomainDefPtr def,
static int
bhyveParseCustomLoaderCommandLine(virDomainDefPtr def,
int argc ATTRIBUTE_UNUSED,
int argc G_GNUC_UNUSED,
char **argv)
{
if (!argv)

View File

@ -55,7 +55,7 @@ VIR_LOG_INIT("bhyve.bhyve_process");
static void
bhyveProcessAutoDestroy(virDomainObjPtr vm,
virConnectPtr conn ATTRIBUTE_UNUSED,
virConnectPtr conn G_GNUC_UNUSED,
void *opaque)
{
bhyveConnPtr driver = opaque;