Add g_type_ensure() and use it rather than playing games with volatile

https://bugzilla.gnome.org/show_bug.cgi?id=605976
This commit is contained in:
Dan Winship
2010-01-03 14:47:56 -05:00
parent 2a4235d0f3
commit e011d2c921
12 changed files with 72 additions and 55 deletions

View File

@@ -602,12 +602,10 @@ g_socket_connection_factory_register_type (GType g_type,
static void
init_builtin_types (void)
{
volatile GType a_type;
#ifndef G_OS_WIN32
a_type = g_unix_connection_get_type ();
g_type_ensure (G_TYPE_UNIX_CONNECTION);
#endif
a_type = g_tcp_connection_get_type ();
(a_type); /* To avoid -Wunused-but-set-variable */
g_type_ensure (G_TYPE_TCP_CONNECTION);
}
/**