[virt-tools-list] [PATCH virt-viewer] Fix g_thread_init deprecation warning

Marc-André Lureau marcandre.lureau at gmail.com
Wed Mar 28 14:34:27 UTC 2012


Although the doc says it is only deprecated since >2.32, it's actually
>2.31 according to glib git log.
---
 src/remote-viewer-main.c |    2 ++
 src/virt-viewer-main.c   |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
index d857e45..ffec737 100644
--- a/src/remote-viewer-main.c
+++ b/src/remote-viewer-main.c
@@ -104,7 +104,9 @@ main(int argc, char **argv)
         { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
     };
 
+#if !GLIB_CHECK_VERSION(2,31,0)
     g_thread_init(NULL);
+#endif
 
     setlocale(LC_ALL, "");
     bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
index 4aefc19..c80949b 100644
--- a/src/virt-viewer-main.c
+++ b/src/virt-viewer-main.c
@@ -84,7 +84,9 @@ int main(int argc, char **argv)
         { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
     };
 
+#if !GLIB_CHECK_VERSION(2,31,0)
     g_thread_init(NULL);
+#endif
 
     setlocale(LC_ALL, "");
     bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
-- 
1.7.7.6




More information about the virt-tools-list mailing list