From c05da82c1a427ce535af0c1b3e7a795330cf5061 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 7 Oct 2014 20:46:26 -0600 Subject: [PATCH] gfio: remove warning on g_type_init() being deprecated MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Compile throws this on newer glib: gfio.c: In function ‘init_ui’: gfio.c:1690:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations] g_type_init(); ^ Fix it with a GLIB_CHECK_VERSION() check for 2.36.0. Signed-off-by: Jens Axboe --- gfio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfio.c b/gfio.c index 37c1db69..0e22cbaa 100644 --- a/gfio.c +++ b/gfio.c @@ -1687,7 +1687,9 @@ static void init_ui(int *argc, char **argv[], struct gui *ui) gtk_init(argc, argv); settings = gtk_settings_get_default(); gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "gfio setting"); +#if !GLIB_CHECK_VERSION(2, 36, 0) g_type_init(); +#endif gdk_color_parse("#fffff4", &gfio_color_lightyellow); gdk_color_parse("white", &gfio_color_white); -- 2.25.1