mirror of https://gitee.com/openkylin/libvirt.git
nwfilter: 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:
parent
1bfa9fb3bc
commit
5693bc87a3
|
@ -661,7 +661,7 @@ virNWFilterSnoopReqUnlock(virNWFilterSnoopReqPtr req)
|
|||
* virNWFilterSnoopReqRelease - hash table free function to kill a request
|
||||
*/
|
||||
static void
|
||||
virNWFilterSnoopReqRelease(void *req0, const void *name ATTRIBUTE_UNUSED)
|
||||
virNWFilterSnoopReqRelease(void *req0, const void *name G_GNUC_UNUSED)
|
||||
{
|
||||
virNWFilterSnoopReqPtr req = req0;
|
||||
|
||||
|
@ -1826,8 +1826,8 @@ virNWFilterSnoopLeaseFileSave(virNWFilterSnoopIPLeasePtr ipl)
|
|||
*/
|
||||
static int
|
||||
virNWFilterSnoopPruneIter(const void *payload,
|
||||
const void *name ATTRIBUTE_UNUSED,
|
||||
const void *data ATTRIBUTE_UNUSED)
|
||||
const void *name G_GNUC_UNUSED,
|
||||
const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virNWFilterSnoopReqPtr req = (virNWFilterSnoopReqPtr)payload;
|
||||
bool del_req;
|
||||
|
@ -1856,7 +1856,7 @@ virNWFilterSnoopPruneIter(const void *payload,
|
|||
*/
|
||||
static int
|
||||
virNWFilterSnoopSaveIter(void *payload,
|
||||
const void *name ATTRIBUTE_UNUSED,
|
||||
const void *name G_GNUC_UNUSED,
|
||||
void *data)
|
||||
{
|
||||
virNWFilterSnoopReqPtr req = payload;
|
||||
|
@ -2023,8 +2023,8 @@ virNWFilterSnoopJoinThreads(void)
|
|||
*/
|
||||
static int
|
||||
virNWFilterSnoopRemAllReqIter(const void *payload,
|
||||
const void *name ATTRIBUTE_UNUSED,
|
||||
const void *data ATTRIBUTE_UNUSED)
|
||||
const void *name G_GNUC_UNUSED,
|
||||
const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virNWFilterSnoopReqPtr req = (virNWFilterSnoopReqPtr)payload;
|
||||
|
||||
|
@ -2200,7 +2200,7 @@ virNWFilterDHCPSnoopInit(void)
|
|||
}
|
||||
|
||||
void
|
||||
virNWFilterDHCPSnoopEnd(const char *ifname ATTRIBUTE_UNUSED)
|
||||
virNWFilterDHCPSnoopEnd(const char *ifname G_GNUC_UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2212,9 +2212,9 @@ virNWFilterDHCPSnoopShutdown(void)
|
|||
}
|
||||
|
||||
int
|
||||
virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr techdriver ATTRIBUTE_UNUSED,
|
||||
virNWFilterBindingDefPtr binding ATTRIBUTE_UNUSED,
|
||||
virNWFilterDriverStatePtr driver ATTRIBUTE_UNUSED)
|
||||
virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr techdriver G_GNUC_UNUSED,
|
||||
virNWFilterBindingDefPtr binding G_GNUC_UNUSED,
|
||||
virNWFilterDriverStatePtr driver G_GNUC_UNUSED)
|
||||
{
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("libvirt was not compiled with libpcap and \""
|
||||
|
|
|
@ -80,9 +80,9 @@ static void nwfilterDriverUnlock(void)
|
|||
#ifdef WITH_FIREWALLD
|
||||
|
||||
static DBusHandlerResult
|
||||
nwfilterFirewalldDBusFilter(DBusConnection *connection ATTRIBUTE_UNUSED,
|
||||
nwfilterFirewalldDBusFilter(DBusConnection *connection G_GNUC_UNUSED,
|
||||
DBusMessage *message,
|
||||
void *user_data ATTRIBUTE_UNUSED)
|
||||
void *user_data G_GNUC_UNUSED)
|
||||
{
|
||||
if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS,
|
||||
"NameOwnerChanged") ||
|
||||
|
@ -154,7 +154,7 @@ nwfilterDriverRemoveDBusMatches(void)
|
|||
}
|
||||
|
||||
static int
|
||||
nwfilterDriverInstallDBusMatches(DBusConnection *sysbus ATTRIBUTE_UNUSED)
|
||||
nwfilterDriverInstallDBusMatches(DBusConnection *sysbus G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -177,8 +177,8 @@ virNWFilterTriggerRebuildImpl(void *opaque)
|
|||
*/
|
||||
static int
|
||||
nwfilterStateInitialize(bool privileged,
|
||||
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
DBusConnection *sysbus = NULL;
|
||||
|
||||
|
@ -384,8 +384,8 @@ nwfilterStateCleanup(void)
|
|||
|
||||
static virDrvOpenStatus
|
||||
nwfilterConnectOpen(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);
|
||||
|
@ -409,27 +409,27 @@ nwfilterConnectOpen(virConnectPtr conn,
|
|||
return VIR_DRV_OPEN_SUCCESS;
|
||||
}
|
||||
|
||||
static int nwfilterConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
static int nwfilterConnectClose(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int nwfilterConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
static int nwfilterConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
/* Trivially secure, since always inside the daemon */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int nwfilterConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
static int nwfilterConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
/* Not encrypted, but remote driver takes care of that */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int nwfilterConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
static int nwfilterConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -616,9 +616,9 @@ iptablesLinkTmpRootChainsFW(virFirewallPtr fw,
|
|||
|
||||
|
||||
static void
|
||||
iptablesSetupVirtInPostFW(virFirewallPtr fw ATTRIBUTE_UNUSED,
|
||||
virFirewallLayer layer ATTRIBUTE_UNUSED,
|
||||
const char *ifname ATTRIBUTE_UNUSED)
|
||||
iptablesSetupVirtInPostFW(virFirewallPtr fw G_GNUC_UNUSED,
|
||||
virFirewallLayer layer G_GNUC_UNUSED,
|
||||
const char *ifname G_GNUC_UNUSED)
|
||||
{
|
||||
virFirewallAddRuleFull(fw, layer,
|
||||
true, NULL, NULL,
|
||||
|
@ -2805,7 +2805,7 @@ static int
|
|||
ebtablesRenameTmpSubAndRootChainsQuery(virFirewallPtr fw,
|
||||
virFirewallLayer layer,
|
||||
const char *const *lines,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
char newchain[MAX_CHAINNAME_LENGTH];
|
||||
|
@ -3759,8 +3759,8 @@ ebiptablesDriverProbeCtdir(void)
|
|||
|
||||
|
||||
static int
|
||||
ebiptablesDriverProbeStateMatchQuery(virFirewallPtr fw ATTRIBUTE_UNUSED,
|
||||
virFirewallLayer layer ATTRIBUTE_UNUSED,
|
||||
ebiptablesDriverProbeStateMatchQuery(virFirewallPtr fw G_GNUC_UNUSED,
|
||||
virFirewallLayer layer G_GNUC_UNUSED,
|
||||
const char *const *lines,
|
||||
void *opaque)
|
||||
{
|
||||
|
|
|
@ -140,7 +140,7 @@ struct printString
|
|||
|
||||
|
||||
static int
|
||||
printString(void *payload ATTRIBUTE_UNUSED, const void *name, void *data)
|
||||
printString(void *payload G_GNUC_UNUSED, const void *name, void *data)
|
||||
{
|
||||
struct printString *ps = data;
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ virNWFilterHasLearnReq(int ifindex)
|
|||
|
||||
|
||||
static void
|
||||
freeLearnReqEntry(void *payload, const void *name ATTRIBUTE_UNUSED)
|
||||
freeLearnReqEntry(void *payload, const void *name G_GNUC_UNUSED)
|
||||
{
|
||||
virNWFilterIPAddrLearnReqFree(payload);
|
||||
}
|
||||
|
@ -764,11 +764,11 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver,
|
|||
#else
|
||||
|
||||
int
|
||||
virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver ATTRIBUTE_UNUSED,
|
||||
virNWFilterBindingDefPtr binding ATTRIBUTE_UNUSED,
|
||||
int ifindex ATTRIBUTE_UNUSED,
|
||||
virNWFilterDriverStatePtr driver ATTRIBUTE_UNUSED,
|
||||
int howDetect ATTRIBUTE_UNUSED)
|
||||
virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver G_GNUC_UNUSED,
|
||||
virNWFilterBindingDefPtr binding G_GNUC_UNUSED,
|
||||
int ifindex G_GNUC_UNUSED,
|
||||
virNWFilterDriverStatePtr driver G_GNUC_UNUSED,
|
||||
int howDetect G_GNUC_UNUSED)
|
||||
{
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("IP parameter must be given since libvirt "
|
||||
|
|
Loading…
Reference in New Issue