diff --git a/gio/tests/fake-service-name.c b/gio/tests/fake-service-name.c index 1a601a50c..c3a61180c 100644 --- a/gio/tests/fake-service-name.c +++ b/gio/tests/fake-service-name.c @@ -51,7 +51,8 @@ incoming_method_call (GDBusConnection *connection, static const GDBusInterfaceVTable interface_vtable = { incoming_method_call, NULL, - NULL + NULL, + { 0 } }; static void diff --git a/glib/deprecated/gthread.h b/glib/deprecated/gthread.h index 33b422240..2d490a110 100644 --- a/glib/deprecated/gthread.h +++ b/glib/deprecated/gthread.h @@ -125,7 +125,11 @@ void g_thread_foreach (GFunc thread_func, #endif #define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl GLIB_DEPRECATED_MACRO_IN_2_32 +#ifndef G_OS_WIN32 +#define G_STATIC_MUTEX_INIT { NULL, PTHREAD_MUTEX_INITIALIZER } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init) +#else #define G_STATIC_MUTEX_INIT { NULL } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init) +#endif typedef struct { GMutex *mutex; diff --git a/glib/gscanner.c b/glib/gscanner.c index c858abf9e..9102b3a92 100644 --- a/glib/gscanner.c +++ b/glib/gscanner.c @@ -1678,7 +1678,7 @@ g_scanner_get_token_i (GScanner *scanner, case G_TOKEN_SYMBOL: if (scanner->config->symbol_2_token) - *token_p = (GTokenType) value_p->v_symbol; + *token_p = (GTokenType) ((size_t) value_p->v_symbol); break; case G_TOKEN_BINARY: diff --git a/tests/memchunks.c b/tests/memchunks.c index fae7c4107..f574ed8b0 100644 --- a/tests/memchunks.c +++ b/tests/memchunks.c @@ -49,7 +49,7 @@ static guint mem_chunk_recursion = 0; /* --- old memchunk prototypes --- */ GMemChunk* old_mem_chunk_new (const gchar *name, - gint atom_size, + gulong atom_size, gulong area_size, gint type); void old_mem_chunk_destroy (GMemChunk *mem_chunk); @@ -129,7 +129,7 @@ static GMemChunk *mem_chunks = NULL; GMemChunk* old_mem_chunk_new (const gchar *name, - gint atom_size, + gulong atom_size, gulong area_size, gint type) { diff --git a/tests/thread-test.c b/tests/thread-test.c index 17ac41f7b..883aa5424 100644 --- a/tests/thread-test.c +++ b/tests/thread-test.c @@ -211,7 +211,7 @@ test_g_static_private (void) test_g_static_private_ready = 0; for (i = 0; i < THREADS; i++) - g_assert (GPOINTER_TO_INT (g_thread_join (threads[i])) == i * 3); + g_assert (GPOINTER_TO_UINT (g_thread_join (threads[i])) == i * 3); g_assert (test_g_static_private_counter == 0); } diff --git a/tests/threadpool-test.c b/tests/threadpool-test.c index dfd138212..1612e274e 100644 --- a/tests/threadpool-test.c +++ b/tests/threadpool-test.c @@ -248,7 +248,7 @@ test_thread_sort (gboolean sort) GThreadPool *pool; guint limit; guint max_threads; - gint i; + guint i; limit = MAX_THREADS * 10; @@ -293,8 +293,8 @@ test_thread_sort (gboolean sort) g_thread_pool_unprocessed (pool))); } - g_assert (g_thread_pool_get_max_threads (pool) == max_threads); - g_assert (g_thread_pool_get_num_threads (pool) == g_thread_pool_get_max_threads (pool)); + g_assert (g_thread_pool_get_max_threads (pool) == (gint) max_threads); + g_assert (g_thread_pool_get_num_threads (pool) == (guint) g_thread_pool_get_max_threads (pool)); g_thread_pool_free (pool, TRUE, TRUE); } @@ -337,7 +337,7 @@ test_thread_idle_time (void) { guint limit = 50; guint interval = 10000; - gint i; + guint i; idle_pool = g_thread_pool_new (test_thread_idle_time_entry_func, NULL, diff --git a/tests/unicode-encoding.c b/tests/unicode-encoding.c index c729b284d..b0603d105 100644 --- a/tests/unicode-encoding.c +++ b/tests/unicode-encoding.c @@ -137,7 +137,7 @@ process (gint line, ucs4_result = g_utf8_to_ucs4 (utf8, -1, &items_read, NULL, &error); - if (!ucs4_result || items_read == strlen (utf8)) + if (!ucs4_result || items_read == (glong) strlen (utf8)) { fail ("line %d: incomplete input not properly detected\n", line); return; @@ -158,7 +158,7 @@ process (gint line, } if (!ucs4_equal (ucs4_result, ucs4) || - items_read != strlen (utf8) || + items_read != (glong) strlen (utf8) || items_written != ucs4_len) { fail ("line %d: results of conversion with status %d to ucs4 do not match expected.\n", line, status); @@ -195,7 +195,7 @@ process (gint line, if (strcmp (utf8_result, utf8) != 0 || items_read != ucs4_len || - items_written != strlen (utf8)) + items_written != (glong) strlen (utf8)) { fail ("line %d: conversion back to utf8 did not match original\n", line); return; @@ -257,7 +257,7 @@ process (gint line, return; } - if (items_read != strlen (utf8) || + if (items_read != (glong) strlen (utf8) || utf16_count (utf16_from_utf8) != items_written) { fail ("line %d: length error in conversion to ucs16\n", line); @@ -291,7 +291,7 @@ process (gint line, } if (items_read != utf16_count (utf16_from_utf8) || - items_written != strlen (utf8)) + items_written != (glong) strlen (utf8)) { fail ("line %d: length error in conversion from ucs16 to utf8\n", line); return;