projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97fe421
)
Ensure g_inet_address_get_type() call is not optimized away
author
Alexander Larsson
<alexl@redhat.com>
Thu, 30 Apr 2009 08:46:37 +0000
(10:46 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Thu, 30 Apr 2009 08:46:37 +0000
(10:46 +0200)
Yet another place where the get_type call can be optimized away due
to the G_GNUC_CONST attribute. Use a volatile variable to ensure
its not.
gio/gresolver.c
patch
|
blob
|
history
diff --git
a/gio/gresolver.c
b/gio/gresolver.c
index
8b51015
..
92f7236
100644
(file)
--- a/
gio/gresolver.c
+++ b/
gio/gresolver.c
@@
-69,8
+69,10
@@
G_DEFINE_TYPE (GResolver, g_resolver, G_TYPE_OBJECT)
static void
g_resolver_class_init (GResolverClass *resolver_class)
{
+ volatile GType type;
+
/* Make sure _g_networking_init() has been called */
-
(void)
g_inet_address_get_type ();
+
type =
g_inet_address_get_type ();
/* Initialize _g_resolver_addrinfo_hints */
#ifdef AI_ADDRCONFIG