From 85556079abd82cc6d86a395e5b3e9e35da1482a8 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 14 Dec 2011 10:51:58 +0100 Subject: Fix build warnings with glib 2.32 --- tests/wocky-http-proxy-test.c | 4 ++++ tests/wocky-sasl-utils-test.c | 4 ++++ tests/wocky-test-helper.c | 3 +++ 3 files changed, 11 insertions(+) diff --git a/tests/wocky-http-proxy-test.c b/tests/wocky-http-proxy-test.c index ebe711c..9567401 100644 --- a/tests/wocky-http-proxy-test.c +++ b/tests/wocky-http-proxy-test.c @@ -101,7 +101,11 @@ static void run_in_thread (HttpTestData *data, GThreadFunc func) { +#if GLIB_CHECK_VERSION (2, 31, 0) + data->thread = g_thread_new ("server_thread", func, data); +#else data->thread = g_thread_create (func, data, TRUE, NULL); +#endif g_assert (data->thread != NULL); } diff --git a/tests/wocky-sasl-utils-test.c b/tests/wocky-sasl-utils-test.c index 1b0d359..98a1d08 100644 --- a/tests/wocky-sasl-utils-test.c +++ b/tests/wocky-sasl-utils-test.c @@ -146,7 +146,11 @@ main (int argc, char **argv) { int i; + +#if !GLIB_CHECK_VERSION (2, 31, 0) g_thread_init (NULL); +#endif + g_test_init (&argc, &argv, NULL); for (i = 0 ; hmac_sha1_tests[i].key_len > 0 ; i++) diff --git a/tests/wocky-test-helper.c b/tests/wocky-test-helper.c index 3bf7496..665afeb 100644 --- a/tests/wocky-test-helper.c +++ b/tests/wocky-test-helper.c @@ -288,7 +288,10 @@ void test_init (int argc, char **argv) { +#if !GLIB_CHECK_VERSION (2, 31, 0) g_thread_init (NULL); +#endif + g_test_init (&argc, &argv, NULL); g_type_init (); wocky_init (); -- cgit v1.2.3