Merge branch 'fix_more_warnings' into 'main'

Fix more warnings

See merge request GNOME/glib!2192
This commit is contained in:
Philip Withnall 2021-07-21 21:07:27 +00:00
commit 3029f9a05b
2 changed files with 4 additions and 4 deletions

View File

@ -266,7 +266,7 @@ g_rand_new (void)
* MinGW-w64 has a wrapper that will emulate rand_s() if it's not in msvcrt
*/
#if (defined(_MSC_VER) && _MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR)
gint i;
gsize i;
for (i = 0; i < G_N_ELEMENTS (seed); i++)
rand_s (&seed[i]);

View File

@ -307,12 +307,12 @@ static CRITICAL_SECTION g_private_lock;
static DWORD
g_private_get_impl (GPrivate *key)
{
DWORD impl = (DWORD) key->p;
DWORD impl = (DWORD) GPOINTER_TO_UINT(key->p);
if G_UNLIKELY (impl == 0)
{
EnterCriticalSection (&g_private_lock);
impl = (DWORD) key->p;
impl = (UINT_PTR) key->p;
if (impl == 0)
{
GPrivateDestructor *destructor;
@ -603,7 +603,7 @@ SetThreadName (DWORD dwThreadID,
if ((!IsDebuggerPresent ()) && (SetThreadName_VEH_handle == NULL))
return;
RaiseException (EXCEPTION_SET_THREAD_NAME, 0, infosize, (DWORD *) &info);
RaiseException (EXCEPTION_SET_THREAD_NAME, 0, infosize, (const ULONG_PTR *) &info);
#endif
}