mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
gthread-win32: Fix conversion error from pointer to integer
glib/gthread-win32.c:359:16: error: incompatible integer to pointer conversion passing 'DWORD' (aka 'unsigned long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion] if (!g_atomic_pointer_compare_and_exchange (&key->p, NULL, impl)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ glib/gatomic.h:257:73: note: expanded from macro 'g_atomic_pointer_compare_and_exchange' __atomic_compare_exchange_n ((atomic), (void *) (&(gapcae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \ ^~~~~~~~
This commit is contained in:
parent
51cf76ebb0
commit
4f72d3bce7
@ -356,7 +356,7 @@ g_private_get_impl (GPrivate *key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Ditto, due to the unlocked access on the fast path */
|
/* Ditto, due to the unlocked access on the fast path */
|
||||||
if (!g_atomic_pointer_compare_and_exchange (&key->p, NULL, impl))
|
if (!g_atomic_pointer_compare_and_exchange (&key->p, NULL, GUINT_TO_POINTER (impl)))
|
||||||
g_thread_abort (0, "g_private_get_impl(2)");
|
g_thread_abort (0, "g_private_get_impl(2)");
|
||||||
}
|
}
|
||||||
LeaveCriticalSection (&g_private_lock);
|
LeaveCriticalSection (&g_private_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user