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

Daniel P. Berrange berrange at redhat.com
Wed Mar 28 14:40:26 UTC 2012


On Wed, Mar 28, 2012 at 04:34:27PM +0200, Marc-André Lureau wrote:
> 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);

ACK

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list