diff options
author | Dan Winship <danw@gnome.org> | 2010-01-03 14:47:56 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2012-05-15 13:46:38 -0400 |
commit | e011d2c92162d25a6e6d5f67d462edfeb4af3d7a (patch) | |
tree | c86d4101df01a2ace2b89597d5431fcfb78eed78 /gio/gunixconnection.c | |
parent | 2a4235d0f3fe3b3fb007385ee59082c0987158ce (diff) | |
download | glib-e011d2c92162d25a6e6d5f67d462edfeb4af3d7a.tar.gz |
Add g_type_ensure() and use it rather than playing games with volatile
https://bugzilla.gnome.org/show_bug.cgi?id=605976
Diffstat (limited to 'gio/gunixconnection.c')
-rw-r--r-- | gio/gunixconnection.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c index 70a31a4e5..b0ac143d9 100644 --- a/gio/gunixconnection.c +++ b/gio/gunixconnection.c @@ -473,7 +473,6 @@ g_unix_connection_receive_credentials (GUnixConnection *connection, gint nscm; GSocket *socket; gint n; - volatile GType credentials_message_gtype; gssize num_bytes_read; #ifdef __linux__ gboolean turn_off_so_passcreds; @@ -543,9 +542,7 @@ g_unix_connection_receive_credentials (GUnixConnection *connection, } #endif - /* ensure the type of GUnixCredentialsMessage has been registered with the type system */ - credentials_message_gtype = G_TYPE_UNIX_CREDENTIALS_MESSAGE; - (credentials_message_gtype); /* To avoid -Wunused-but-set-variable */ + g_type_ensure (G_TYPE_UNIX_CREDENTIALS_MESSAGE); num_bytes_read = g_socket_receive_message (socket, NULL, /* GSocketAddress **address */ NULL, |