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.
This commit is contained in:
Martin Pitt 2013-08-29 11:10:15 +02:00
parent 2b10e20262
commit 7933b0e552
4 changed files with 8 additions and 0 deletions

View file

@ -39,7 +39,9 @@ main (int argc, char **argv)
gboolean ret;
GError *error = NULL;
#if !defined(GLIB_VERSION_2_36)
g_type_init ();
#endif
g_test_init (&argc, &argv, NULL);
d = hidpp_device_new ();

View file

@ -204,7 +204,9 @@ main (gint argc, gchar **argv)
{ NULL}
};
#if !defined(GLIB_VERSION_2_36)
g_type_init ();
#endif
context = g_option_context_new ("upower daemon");
g_option_context_add_main_entries (context, options, NULL);

View file

@ -333,7 +333,9 @@ up_test_wakeups_func (void)
int
main (int argc, char **argv)
{
#if !defined(GLIB_VERSION_2_36)
g_type_init ();
#endif
g_test_init (&argc, &argv, NULL);
/* make check, vs. make distcheck */

View file

@ -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);