Commit dac3e280 authored by Philip Withnall's avatar Philip Withnall

tests: Remove g_type_init() calls

We depend on GLib 2.36.0, which deprecated g_type_init() since GType
initialisation is now done automatically.
Reviewed-by: Olivier Crête's avatarOlivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D296
parent fae0f9d3
......@@ -90,7 +90,6 @@ NiceAgent GObject interface defined in 'nice/agent.h'.
The rough order of control follow is as follows:
- client should initialize glib with g_type_init()
- creation of NiceAgent object instance
- setting agent properties such as STUN and TURN server addresses
- connecting the GObject signals with g_signal_connect() to application
......
......@@ -95,11 +95,7 @@ main(int argc, char *argv[])
g_debug("Using stun server '[%s]:%u'\n", stun_addr, stun_port);
}
#if GLIB_CHECK_VERSION(2, 36, 0)
g_networking_init();
#else
g_type_init();
#endif
gloop = g_main_loop_new(NULL, FALSE);
......
......@@ -105,11 +105,7 @@ main(int argc, char *argv[])
g_debug("Using stun server '[%s]:%u'\n", stun_addr, stun_port);
}
#if GLIB_CHECK_VERSION(2, 36, 0)
g_networking_init();
#else
g_type_init();
#endif
gloop = g_main_loop_new(NULL, FALSE);
#ifdef G_OS_WIN32
......
......@@ -104,11 +104,6 @@ main(int argc, char *argv[])
g_debug("Using stun server '[%s]:%u'\n", stun_addr, stun_port);
}
#if GLIB_CHECK_VERSION(2, 36, 0)
g_networking_init();
#else
g_type_init();
#endif
g_networking_init();
gloop = g_main_loop_new(NULL, FALSE);
......
......@@ -54,7 +54,6 @@ main (void)
WSAStartup(0x0202, &w);
#endif
nice_address_init (&addr);
g_type_init ();
g_thread_init (NULL);
if (!nice_address_set_from_string (&addr, "127.0.0.1"))
......
......@@ -368,8 +368,6 @@ test_multi_message_recv (guint n_sends, guint n_receives,
int
main (void)
{
g_type_init ();
test_socket_initial_properties ();
test_socket_address_properties ();
test_simple_send_recv ();
......
......@@ -440,7 +440,6 @@ main (void)
WSAStartup (0x0202, &w);
#endif
nice_address_init (&addr);
g_type_init ();
g_thread_init (NULL);
g_assert (nice_address_set_from_string (&addr, "127.0.0.1"));
......
......@@ -172,7 +172,6 @@ int main (void)
WSADATA w;
WSAStartup(0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
loop = g_main_loop_new (NULL, FALSE);
......
......@@ -215,7 +215,6 @@ int main (void)
WSAStartup(0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
global_mainloop = g_main_loop_new (NULL, FALSE);
......
......@@ -491,7 +491,6 @@ int main (void)
WSAStartup(0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
global_mainloop = g_main_loop_new (NULL, FALSE);
......
......@@ -834,7 +834,6 @@ int main (void)
WSAStartup(0x0202, &w);
#endif
g_type_init ();
g_thread_init(NULL);
global_mainloop = g_main_loop_new (NULL, FALSE);
......
......@@ -397,7 +397,6 @@ int main (void)
WSAStartup(0x0202, &w);
#endif
g_type_init ();
#if !GLIB_CHECK_VERSION(2,31,8)
g_thread_init(NULL);
#endif
......
......@@ -112,7 +112,6 @@ int main (void)
WSADATA w;
WSAStartup (0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
l_data.cancellable = g_cancellable_new ();
......
......@@ -127,7 +127,6 @@ int main (void)
WSADATA w;
WSAStartup (0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
run_io_stream_test (30, TRUE, &callbacks, (gpointer) TRUE, NULL, NULL, NULL);
......
......@@ -127,7 +127,6 @@ int main (void)
WSADATA w;
WSAStartup (0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
run_io_stream_test (30, TRUE, &callbacks, (gpointer) TRUE, NULL, NULL, NULL);
......
......@@ -159,7 +159,6 @@ int main (void)
WSADATA w;
WSAStartup (0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
l_data = g_malloc0 (sizeof (ThreadData));
......
......@@ -124,7 +124,6 @@ int main (void)
WSADATA w;
WSAStartup (0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
l_data = g_malloc0 (sizeof (ThreadData));
......
......@@ -72,7 +72,6 @@ main (void)
guint stream;
nice_address_init (&addr);
g_type_init ();
g_thread_init(NULL);
loop = g_main_loop_new (NULL, FALSE);
......
......@@ -725,8 +725,6 @@ int main(void)
GSource *src;
int sock;
g_type_init();
global_cancellable = g_cancellable_new ();
src = g_cancellable_source_new (global_cancellable);
g_source_set_dummy_callback (src);
......
......@@ -395,7 +395,6 @@ int main (int argc, char *argv[])
GError *error = NULL;
setlocale (LC_ALL, "");
g_type_init ();
/* Configuration. */
context = g_option_context_new ("— fuzz-test the pseudotcp socket");
......
......@@ -259,8 +259,6 @@ int main (int argc, char *argv[])
mainloop = g_main_loop_new (NULL, FALSE);
g_type_init ();
pseudo_tcp_set_debug_level (PSEUDO_TCP_DEBUG_VERBOSE);
left_closed = right_closed = FALSE;
......
......@@ -400,7 +400,6 @@ int main (void)
WSAStartup(0x0202, &w);
#endif
g_type_init ();
g_thread_init(NULL);
global_mainloop = g_main_loop_new (NULL, FALSE);
......
......@@ -1202,7 +1202,6 @@ main (int argc, char *argv[])
WSADATA w;
WSAStartup (0x0202, &w);
#endif
g_type_init ();
g_thread_init (NULL);
if (!long_mode) {
......
......@@ -88,8 +88,6 @@ main (void)
NiceAddress active_bind_addr, passive_bind_addr;
GSource *srv_listen_source, *srv_input_source, *cli_input_source;
g_type_init ();
mainloop = g_main_loop_new (NULL, FALSE);
nice_address_init (&active_bind_addr);
......
......@@ -211,7 +211,6 @@ int main (void)
WSADATA w;
WSAStartup(0x0202, &w);
#endif
g_type_init ();
g_thread_init(NULL);
lmainctx = g_main_context_new ();
......
......@@ -75,7 +75,6 @@ main (void)
nice_address_init (&addr_local);
nice_address_init (&addr_remote);
g_type_init ();
g_thread_init(NULL);
......
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