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