summaryrefslogtreecommitdiff
path: root/gio/gsocketcontrolmessage.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2010-01-03 14:47:56 -0500
committerDan Winship <danw@gnome.org>2012-05-15 13:46:38 -0400
commite011d2c92162d25a6e6d5f67d462edfeb4af3d7a (patch)
treec86d4101df01a2ace2b89597d5431fcfb78eed78 /gio/gsocketcontrolmessage.c
parent2a4235d0f3fe3b3fb007385ee59082c0987158ce (diff)
downloadglib-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/gsocketcontrolmessage.c')
-rw-r--r--gio/gsocketcontrolmessage.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gio/gsocketcontrolmessage.c b/gio/gsocketcontrolmessage.c
index 6b1ad8df8..4cd3ed8e8 100644
--- a/gio/gsocketcontrolmessage.c
+++ b/gio/gsocketcontrolmessage.c
@@ -177,15 +177,11 @@ g_socket_control_message_deserialize (int level,
GType *message_types;
guint n_message_types;
int i;
-#ifndef G_OS_WIN32
- volatile GType a_type;
-#endif
/* Ensure we know about the built in types */
#ifndef G_OS_WIN32
- a_type = g_unix_credentials_message_get_type ();
- a_type = g_unix_fd_message_get_type ();
- (a_type); /* To avoid -Wunused-but-set-variable */
+ g_type_ensure (G_TYPE_UNIX_CREDENTIALS_MESSAGE);
+ g_type_ensure (G_TYPE_UNIX_FD_MESSAGE);
#endif
message_types = g_type_children (G_TYPE_SOCKET_CONTROL_MESSAGE, &n_message_types);