mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-31 04:43:06 +02:00
Fix cast from pointer to integer of different size warnings in glib/gthread-win32.c
glib/gthread-win32.c: In function 'g_private_get_impl': glib/gthread-win32.c:310:16: warning: cast from pointer to integer of different size DWORD impl = (DWORD) key->p; ^ glib/gthread-win32.c:315:14: warning: cast from pointer to integer of different size impl = (DWORD) key->p; ^ glib/gthread-win32.c: In function 'SetThreadName': glib/gthread-win32.c:596:60: warning: passing argument 4 of 'RaiseException' from incompatible pointer type RaiseException (EXCEPTION_SET_THREAD_NAME, 0, infosize, (DWORD *) &info); ^~~~~~~~~~~~~~~
This commit is contained in:
parent
92540e76d7
commit
28dcec03e1
@ -307,12 +307,12 @@ static CRITICAL_SECTION g_private_lock;
|
|||||||
static DWORD
|
static DWORD
|
||||||
g_private_get_impl (GPrivate *key)
|
g_private_get_impl (GPrivate *key)
|
||||||
{
|
{
|
||||||
DWORD impl = (DWORD) key->p;
|
DWORD impl = (DWORD) GPOINTER_TO_UINT(key->p);
|
||||||
|
|
||||||
if G_UNLIKELY (impl == 0)
|
if G_UNLIKELY (impl == 0)
|
||||||
{
|
{
|
||||||
EnterCriticalSection (&g_private_lock);
|
EnterCriticalSection (&g_private_lock);
|
||||||
impl = (DWORD) key->p;
|
impl = (UINT_PTR) key->p;
|
||||||
if (impl == 0)
|
if (impl == 0)
|
||||||
{
|
{
|
||||||
GPrivateDestructor *destructor;
|
GPrivateDestructor *destructor;
|
||||||
@ -603,7 +603,7 @@ SetThreadName (DWORD dwThreadID,
|
|||||||
if ((!IsDebuggerPresent ()) && (SetThreadName_VEH_handle == NULL))
|
if ((!IsDebuggerPresent ()) && (SetThreadName_VEH_handle == NULL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RaiseException (EXCEPTION_SET_THREAD_NAME, 0, infosize, (DWORD *) &info);
|
RaiseException (EXCEPTION_SET_THREAD_NAME, 0, infosize, (const ULONG_PTR *) &info);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user