[dbus PATCH] maint: fix compiler errors for FreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
---
 src/connect.c | 3 +--
 src/connect.h | 5 +++++
 src/network.c | 4 +---
 src/network.h | 6 ++++++
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/connect.c b/src/connect.c
index f0da1dd..f8f76a2 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -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,
diff --git a/src/connect.h b/src/connect.h
index 961b115..829bd57 100644
--- a/src/connect.h
+++ b/src/connect.h
@@ -44,3 +44,8 @@ virtDBusConnectOpen(virtDBusConnect *connect,
 
 void
 virtDBusConnectListFree(virtDBusConnect **connectList);
+
+void
+virtDBusConnectFree(virtDBusConnect *connect);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virtDBusConnect, virtDBusConnectFree);
diff --git a/src/network.c b/src/network.c
index f3d5472..95ecdc7 100644
--- a/src/network.c
+++ b/src/network.c
@@ -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,
diff --git a/src/network.h b/src/network.h
index fc53b28..0012585 100644
--- a/src/network.h
+++ b/src/network.h
@@ -1,9 +1,15 @@
 #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);
-- 
2.17.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux