[PATCH weston v2 2/2] Avoid 'g_type_init() is deprecated' warnings
Ryo Munakata
ryomnktml at gmail.com
Sat Oct 4 04:37:13 PDT 2014
Because of g_type_init we see the following:
clients/editor.c:1350:2: warning: ‘g_type_init’ is deprecated (declared
at /usr/include/glib-2.0/gobject/gtype.h:679)
[-Wdeprecated-declarations]
g_type_init() has been deprecated and does nothing
since version GLib 2.36.
Signed-off-by: Ryo Munakata <ryomnktml at gmail.com>
---
clients/editor.c | 2 ++
clients/stacking.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/clients/editor.c b/clients/editor.c
index 421f8fe..87bf68f 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -1347,8 +1347,10 @@ main(int argc, char *argv[])
memset(&editor, 0, sizeof editor);
#ifdef HAVE_PANGO
+#if !GLIB_CHECK_VERSION(2,36,0)
g_type_init();
#endif
+#endif
editor.display = display_create(&argc, argv);
if (editor.display == NULL) {
diff --git a/clients/stacking.c b/clients/stacking.c
index ea6101d..99f2b1f 100644
--- a/clients/stacking.c
+++ b/clients/stacking.c
@@ -289,8 +289,10 @@ main(int argc, char *argv[])
memset(&stacking, 0, sizeof stacking);
#ifdef HAVE_PANGO
+#if !GLIB_CHECK_VERSION(2,36,0)
g_type_init();
#endif
+#endif
stacking.display = display_create(&argc, argv);
if (stacking.display == NULL) {
--
2.1.2
More information about the wayland-devel
mailing list