From 7933b0e55234fca86809dad1dee53f0d8e2b96ec Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 29 Aug 2013 11:10:15 +0200 Subject: trivial: Stop calling deprecated g_type_init() When building with a recent enough glib (>= 2.36), don't call g_type_init() any more. This is deprecated and causes ugly compile warnings. --- tools/up-tool.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/up-tool.c b/tools/up-tool.c index 87051e3..c82dae4 100644 --- a/tools/up-tool.c +++ b/tools/up-tool.c @@ -278,7 +278,9 @@ main (int argc, char **argv) { NULL } }; +#if !defined(GLIB_VERSION_2_36) g_type_init (); +#endif context = g_option_context_new ("UPower tool"); g_option_context_add_main_entries (context, entries, NULL); -- cgit v1.2.1