mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-14 21:08:10 +02:00
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:
parent
2b10e20262
commit
7933b0e552
4 changed files with 8 additions and 0 deletions
|
|
@ -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 ();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue