[Spice-devel] [spice-gtk 4/5] controller: Don't call g_type_init() in test with newer glib

Christophe Fergeau cfergeau at redhat.com
Mon Jan 6 03:25:12 PST 2014


g_type_init() is deprecated, calling it on newer glib causes a compile-time
warning.
---
 gtk/controller/test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gtk/controller/test.c b/gtk/controller/test.c
index c7ae8f0..851f237 100644
--- a/gtk/controller/test.c
+++ b/gtk/controller/test.c
@@ -214,7 +214,9 @@ int main (int argc, char *argv[])
     ControllerValue msg;
     ssize_t read;
 
+#if !GLIB_CHECK_VERSION(2,36,0)
     g_type_init ();
+#endif
     ctrl = spice_ctrl_controller_new ();
     loop = g_main_loop_new (NULL, FALSE);
     g_signal_connect (ctrl, "notify", G_CALLBACK (notified), NULL);
-- 
1.8.4.2



More information about the Spice-devel mailing list