mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-07 11:09:39 +02:00
Ensure g_inet_address_get_type() call is not optimized away
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.
This commit is contained in:
parent
97fe421518
commit
d8029ca9bc
@ -69,8 +69,10 @@ G_DEFINE_TYPE (GResolver, g_resolver, G_TYPE_OBJECT)
|
|||||||
static void
|
static void
|
||||||
g_resolver_class_init (GResolverClass *resolver_class)
|
g_resolver_class_init (GResolverClass *resolver_class)
|
||||||
{
|
{
|
||||||
|
volatile GType type;
|
||||||
|
|
||||||
/* Make sure _g_networking_init() has been called */
|
/* 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 */
|
/* Initialize _g_resolver_addrinfo_hints */
|
||||||
#ifdef AI_ADDRCONFIG
|
#ifdef AI_ADDRCONFIG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user