[glibmm] tests: Avoid an unused function warnings from G_DECLARE_INTERFACE().



commit 6e9d8ec77d4c6a55dbef8b333c3514f4aa0b609a
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri May 26 15:00:35 2017 +0200

    tests: Avoid an unused function warnings from G_DECLARE_INTERFACE().

 tests/glibmm_interface_move/main.cc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/tests/glibmm_interface_move/main.cc b/tests/glibmm_interface_move/main.cc
index 16fa72a..b1888fd 100644
--- a/tests/glibmm_interface_move/main.cc
+++ b/tests/glibmm_interface_move/main.cc
@@ -20,6 +20,13 @@ static void test_Iface_init(gpointer)
 GType
 test_Iface_get_type(void)
 {
+  // Avoid compiler warnings about unused functions.
+  // TODO: With C++17, use [[maybe unused]].
+  (void)TEST_IFACE;
+  (void)TEST_IS_IFACE;
+  (void)TEST_IFACE_GET_IFACE;
+  (void)glib_autoptr_cleanup_TestIface;
+
   static GType type = 0;
 
   if (!type)


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