From 64fe683c440d7ec7140fd27f53fbaf54da37b249 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 27 Oct 2012 12:18:53 +0100 Subject: tests: Put g_type_init() under conditional compilation Starting from GLib 2.36, g_type_init() is going to be deprecated (the type system will be initialized as soon as libgobject is paged in, using constructors). As I don't want to bump dependencies just for that, the call to g_type_init() should be placed under a compile-time version check, to keep the noise from compiler warnings down. --- json-glib/tests/node.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'json-glib/tests/node.c') diff --git a/json-glib/tests/node.c b/json-glib/tests/node.c index 51dc3ff..1782c8e 100644 --- a/json-glib/tests/node.c +++ b/json-glib/tests/node.c @@ -246,7 +246,9 @@ int main (int argc, char *argv[]) { +#if !GLIB_CHECK_VERSION (2, 35, 1) g_type_init (); +#endif g_test_init (&argc, &argv, NULL); g_test_add_func ("/nodes/init/int", test_init_int); -- cgit v1.2.1