mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-15 21:08:29 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user