[glibmm/glibmm-2-62] glibmm_interface_move test: Avoid warnings in test_IFace_get_type()



commit aa4811e9d072d78332587a3d5db0b13892242660
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Mar 2 17:01:16 2020 +0800

    glibmm_interface_move test: Avoid warnings in test_IFace_get_type()
    
    ...for Visual Studio builds, since we don't really get unused function
    warnings from the TEST_IFACE items.  Plus, we don't have glib autoptr
    support in Visual Studio builds, either.

 tests/glibmm_interface_move/main.cc | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/tests/glibmm_interface_move/main.cc b/tests/glibmm_interface_move/main.cc
index 1c3b028e..e73a3bfe 100644
--- a/tests/glibmm_interface_move/main.cc
+++ b/tests/glibmm_interface_move/main.cc
@@ -22,10 +22,12 @@ test_Iface_get_type(void)
 {
   // Avoid compiler warnings about unused functions.
   // TODO: With C++17, use [[maybe unused]].
+#ifndef _MSC_VER
   (void)TEST_IFACE;
   (void)TEST_IS_IFACE;
   (void)TEST_IFACE_GET_IFACE;
   (void)glib_autoptr_cleanup_TestIface;
+#endif
 
   static GType type = 0;
 


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