mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-27 04:32:15 +01:00
Merge branch 'fix_more_warnings' into 'master'
Fix more warnings See merge request GNOME/glib!2088
This commit is contained in:
commit
0c259e9fbb
@ -51,7 +51,8 @@ incoming_method_call (GDBusConnection *connection,
|
|||||||
static const GDBusInterfaceVTable interface_vtable = {
|
static const GDBusInterfaceVTable interface_vtable = {
|
||||||
incoming_method_call,
|
incoming_method_call,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL,
|
||||||
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -125,7 +125,11 @@ void g_thread_foreach (GFunc thread_func,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl GLIB_DEPRECATED_MACRO_IN_2_32
|
#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)
|
#define G_STATIC_MUTEX_INIT { NULL } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init)
|
||||||
|
#endif
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GMutex *mutex;
|
GMutex *mutex;
|
||||||
|
@ -1678,7 +1678,7 @@ g_scanner_get_token_i (GScanner *scanner,
|
|||||||
|
|
||||||
case G_TOKEN_SYMBOL:
|
case G_TOKEN_SYMBOL:
|
||||||
if (scanner->config->symbol_2_token)
|
if (scanner->config->symbol_2_token)
|
||||||
*token_p = (GTokenType) value_p->v_symbol;
|
*token_p = (GTokenType) ((size_t) value_p->v_symbol);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case G_TOKEN_BINARY:
|
case G_TOKEN_BINARY:
|
||||||
|
@ -49,7 +49,7 @@ static guint mem_chunk_recursion = 0;
|
|||||||
|
|
||||||
/* --- old memchunk prototypes --- */
|
/* --- old memchunk prototypes --- */
|
||||||
GMemChunk* old_mem_chunk_new (const gchar *name,
|
GMemChunk* old_mem_chunk_new (const gchar *name,
|
||||||
gint atom_size,
|
gulong atom_size,
|
||||||
gulong area_size,
|
gulong area_size,
|
||||||
gint type);
|
gint type);
|
||||||
void old_mem_chunk_destroy (GMemChunk *mem_chunk);
|
void old_mem_chunk_destroy (GMemChunk *mem_chunk);
|
||||||
@ -129,7 +129,7 @@ static GMemChunk *mem_chunks = NULL;
|
|||||||
|
|
||||||
GMemChunk*
|
GMemChunk*
|
||||||
old_mem_chunk_new (const gchar *name,
|
old_mem_chunk_new (const gchar *name,
|
||||||
gint atom_size,
|
gulong atom_size,
|
||||||
gulong area_size,
|
gulong area_size,
|
||||||
gint type)
|
gint type)
|
||||||
{
|
{
|
||||||
|
@ -211,7 +211,7 @@ test_g_static_private (void)
|
|||||||
test_g_static_private_ready = 0;
|
test_g_static_private_ready = 0;
|
||||||
|
|
||||||
for (i = 0; i < THREADS; i++)
|
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);
|
g_assert (test_g_static_private_counter == 0);
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ test_thread_sort (gboolean sort)
|
|||||||
GThreadPool *pool;
|
GThreadPool *pool;
|
||||||
guint limit;
|
guint limit;
|
||||||
guint max_threads;
|
guint max_threads;
|
||||||
gint i;
|
guint i;
|
||||||
|
|
||||||
limit = MAX_THREADS * 10;
|
limit = MAX_THREADS * 10;
|
||||||
|
|
||||||
@ -293,8 +293,8 @@ test_thread_sort (gboolean sort)
|
|||||||
g_thread_pool_unprocessed (pool)));
|
g_thread_pool_unprocessed (pool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert (g_thread_pool_get_max_threads (pool) == max_threads);
|
g_assert (g_thread_pool_get_max_threads (pool) == (gint) max_threads);
|
||||||
g_assert (g_thread_pool_get_num_threads (pool) == g_thread_pool_get_max_threads (pool));
|
g_assert (g_thread_pool_get_num_threads (pool) == (guint) g_thread_pool_get_max_threads (pool));
|
||||||
g_thread_pool_free (pool, TRUE, TRUE);
|
g_thread_pool_free (pool, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ test_thread_idle_time (void)
|
|||||||
{
|
{
|
||||||
guint limit = 50;
|
guint limit = 50;
|
||||||
guint interval = 10000;
|
guint interval = 10000;
|
||||||
gint i;
|
guint i;
|
||||||
|
|
||||||
idle_pool = g_thread_pool_new (test_thread_idle_time_entry_func,
|
idle_pool = g_thread_pool_new (test_thread_idle_time_entry_func,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -137,7 +137,7 @@ process (gint line,
|
|||||||
|
|
||||||
ucs4_result = g_utf8_to_ucs4 (utf8, -1, &items_read, NULL, &error);
|
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);
|
fail ("line %d: incomplete input not properly detected\n", line);
|
||||||
return;
|
return;
|
||||||
@ -158,7 +158,7 @@ process (gint line,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ucs4_equal (ucs4_result, ucs4) ||
|
if (!ucs4_equal (ucs4_result, ucs4) ||
|
||||||
items_read != strlen (utf8) ||
|
items_read != (glong) strlen (utf8) ||
|
||||||
items_written != ucs4_len)
|
items_written != ucs4_len)
|
||||||
{
|
{
|
||||||
fail ("line %d: results of conversion with status %d to ucs4 do not match expected.\n", line, status);
|
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 ||
|
if (strcmp (utf8_result, utf8) != 0 ||
|
||||||
items_read != ucs4_len ||
|
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);
|
fail ("line %d: conversion back to utf8 did not match original\n", line);
|
||||||
return;
|
return;
|
||||||
@ -257,7 +257,7 @@ process (gint line,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (items_read != strlen (utf8) ||
|
if (items_read != (glong) strlen (utf8) ||
|
||||||
utf16_count (utf16_from_utf8) != items_written)
|
utf16_count (utf16_from_utf8) != items_written)
|
||||||
{
|
{
|
||||||
fail ("line %d: length error in conversion to ucs16\n", line);
|
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) ||
|
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);
|
fail ("line %d: length error in conversion from ucs16 to utf8\n", line);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user