Commit 06ea3852 authored by Christian Kellner's avatar Christian Kellner Committed by Bastien Nocera

tests: call g_type_init only if using an old glib

Calling g_type_init() is not needed anymore and deprecated since
glib version 2.36.

https://bugs.freedesktop.org/show_bug.cgi?id=99812
parent 8fa3dcd5
......@@ -114,7 +114,10 @@ static void process_devices(char **argv)
int main(int argc, char **argv)
{
#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init();
#endif
create_manager();
if (argc < 2) {
......
......@@ -159,7 +159,9 @@ int main(int argc, char **argv)
GError *err = NULL;
DBusGProxy *dev;
#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init();
#endif
dbus_g_object_register_marshaller (fprintd_marshal_VOID__STRING_BOOLEAN,
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
......
......@@ -130,7 +130,10 @@ static void process_devices(char **argv)
int main(int argc, char **argv)
{
#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init();
#endif
create_manager();
if (argc < 2) {
......
......@@ -172,7 +172,9 @@ int main(int argc, char **argv)
DBusGProxy *dev;
char *username;
#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init();
#endif
dbus_g_object_register_marshaller (fprintd_marshal_VOID__STRING_BOOLEAN,
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment