Commit d512fd8c authored by Katerina Koukiou's avatar Katerina Koukiou

maint: fix compiler errors for FreeBSD

We were facing such errors:
* error: unused function 'glib_slistautoptr_cleanup_virtDBusConnect

Moving the G_DEFINE_AUTOPTR_CLEANUP_FUNC macros in the header files
fixes the issue.
Signed-off-by: 's avatarKaterina Koukiou <kkoukiou@redhat.com>
Reviewed-by: 's avatarJán Tomko <jtomko@redhat.com>
parent a0d9efde
......@@ -1995,7 +1995,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = {
static GDBusInterfaceInfo *interfaceInfo = NULL;
static void
void
virtDBusConnectFree(virtDBusConnect *connect)
{
if (connect->connection)
......@@ -2011,7 +2011,6 @@ virtDBusConnectFree(virtDBusConnect *connect)
g_free(connect->storageVolPath);
g_free(connect);
}
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virtDBusConnect, virtDBusConnectFree);
void
virtDBusConnectNew(virtDBusConnect **connectp,
......
......@@ -44,3 +44,8 @@ virtDBusConnectOpen(virtDBusConnect *connect,
void
virtDBusConnectListFree(virtDBusConnect **connectList);
void
virtDBusConnectFree(virtDBusConnect *connect);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virtDBusConnect, virtDBusConnectFree);
......@@ -3,7 +3,7 @@
#include <libvirt/libvirt.h>
static void
void
virtDBusNetworkDHCPLeaseListFree(virNetworkDHCPLeasePtr *leases)
{
for (gint i = 0; leases[i] != NULL; i++)
......@@ -12,8 +12,6 @@ virtDBusNetworkDHCPLeaseListFree(virNetworkDHCPLeasePtr *leases)
g_free(leases);
}
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetworkDHCPLeasePtr, virtDBusNetworkDHCPLeaseListFree);
static virNetworkPtr
virtDBusNetworkGetVirNetwork(virtDBusConnect *connect,
const gchar *objectPath,
......
#pragma once
#include "connect.h"
#include <libvirt/libvirt.h>
#define VIRT_DBUS_NETWORK_INTERFACE "org.libvirt.Network"
void
virtDBusNetworkRegister(virtDBusConnect *connect,
GError **error);
void
virtDBusNetworkDHCPLeaseListFree(virNetworkDHCPLeasePtr *leases);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetworkDHCPLeasePtr, virtDBusNetworkDHCPLeaseListFree);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment