[glib/gio-thumbnail-sizes: 6/14] gthread-win32: Fix conversion error from pointer to integer
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/gio-thumbnail-sizes: 6/14] gthread-win32: Fix conversion error from pointer to integer
- Date: Tue, 11 Oct 2022 18:54:50 +0000 (UTC)
commit 1230f8dfaefeeab8d34b41d75818f1c5c075c43b
Author: Biswapriyo Nath <nathbappai gmail com>
Date: Tue Sep 20 11:52:48 2022 +0530
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; \
^~~~~~~~
glib/gthread-win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index 8010520500..25fbe54db9 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -356,7 +356,7 @@ g_private_get_impl (GPrivate *key)
}
/* 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)");
}
LeaveCriticalSection (&g_private_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]