mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Merge branch 'fix_more_warnings' into 'master'
Fix more warnings See merge request GNOME/glib!2030
This commit is contained in:
commit
d42bb394ac
@ -94,7 +94,7 @@ g_expander_converter_convert (GConverter *converter,
|
|||||||
{
|
{
|
||||||
const guint8 *in, *in_end;
|
const guint8 *in, *in_end;
|
||||||
guint8 v, *out;
|
guint8 v, *out;
|
||||||
int i;
|
gsize i;
|
||||||
gsize block_size;
|
gsize block_size;
|
||||||
|
|
||||||
in = inbuf;
|
in = inbuf;
|
||||||
@ -210,7 +210,7 @@ g_compressor_converter_convert (GConverter *converter,
|
|||||||
{
|
{
|
||||||
const guint8 *in, *in_end;
|
const guint8 *in, *in_end;
|
||||||
guint8 v, *out;
|
guint8 v, *out;
|
||||||
int i;
|
gsize i;
|
||||||
gsize block_size;
|
gsize block_size;
|
||||||
|
|
||||||
in = inbuf;
|
in = inbuf;
|
||||||
@ -231,7 +231,7 @@ g_compressor_converter_convert (GConverter *converter,
|
|||||||
block_size = v * 1000;
|
block_size = v * 1000;
|
||||||
|
|
||||||
/* Not enough data */
|
/* Not enough data */
|
||||||
if (in_end - in < block_size)
|
if ((gsize) (in_end - in) < block_size)
|
||||||
{
|
{
|
||||||
if (*bytes_read > 0)
|
if (*bytes_read > 0)
|
||||||
break;
|
break;
|
||||||
@ -254,7 +254,7 @@ g_compressor_converter_convert (GConverter *converter,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v == 0 && in_end - in == block_size && (flags & G_CONVERTER_INPUT_AT_END) == 0)
|
if (v == 0 && (gsize) (in_end - in) == block_size && (flags & G_CONVERTER_INPUT_AT_END) == 0)
|
||||||
{
|
{
|
||||||
if (*bytes_read > 0)
|
if (*bytes_read > 0)
|
||||||
break;
|
break;
|
||||||
@ -297,7 +297,7 @@ test_expander (void)
|
|||||||
GConverter *expander;
|
GConverter *expander;
|
||||||
GConverter *converter;
|
GConverter *converter;
|
||||||
GError *error;
|
GError *error;
|
||||||
int i;
|
gsize i;
|
||||||
|
|
||||||
expander = g_expander_converter_new ();
|
expander = g_expander_converter_new ();
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ test_compressor (void)
|
|||||||
GOutputStream *mem_out, *cstream_out;
|
GOutputStream *mem_out, *cstream_out;
|
||||||
GConverter *expander, *compressor;
|
GConverter *expander, *compressor;
|
||||||
GError *error;
|
GError *error;
|
||||||
int i;
|
gsize i;
|
||||||
|
|
||||||
expander = g_expander_converter_new ();
|
expander = g_expander_converter_new ();
|
||||||
expanded = g_malloc (100*1000); /* Large enough */
|
expanded = g_malloc (100*1000); /* Large enough */
|
||||||
@ -972,7 +972,7 @@ test_converter_pollable (void)
|
|||||||
GPollableOutputStream *pollable_out;
|
GPollableOutputStream *pollable_out;
|
||||||
GConverter *expander, *compressor;
|
GConverter *expander, *compressor;
|
||||||
GError *error;
|
GError *error;
|
||||||
int i;
|
gsize i;
|
||||||
|
|
||||||
expander = g_expander_converter_new ();
|
expander = g_expander_converter_new ();
|
||||||
expanded = g_malloc (100*1000); /* Large enough */
|
expanded = g_malloc (100*1000); /* Large enough */
|
||||||
|
@ -771,7 +771,7 @@ test_communicate_async (gconstpointer test_data)
|
|||||||
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GPtrArray *args;
|
GPtrArray *args;
|
||||||
TestAsyncCommunicateData data = { flags, 0, };
|
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||||
GSubprocess *proc;
|
GSubprocess *proc;
|
||||||
GCancellable *cancellable = NULL;
|
GCancellable *cancellable = NULL;
|
||||||
GBytes *input;
|
GBytes *input;
|
||||||
@ -1022,7 +1022,7 @@ test_communicate_utf8_async (gconstpointer test_data)
|
|||||||
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GPtrArray *args;
|
GPtrArray *args;
|
||||||
TestAsyncCommunicateData data = { flags, 0, };
|
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||||
GSubprocess *proc;
|
GSubprocess *proc;
|
||||||
GCancellable *cancellable = NULL;
|
GCancellable *cancellable = NULL;
|
||||||
|
|
||||||
@ -1055,7 +1055,7 @@ test_communicate_utf8_cancelled_async (gconstpointer test_data)
|
|||||||
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GPtrArray *args;
|
GPtrArray *args;
|
||||||
TestAsyncCommunicateData data = { flags, 0, };
|
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||||
GSubprocess *proc;
|
GSubprocess *proc;
|
||||||
GCancellable *cancellable = NULL;
|
GCancellable *cancellable = NULL;
|
||||||
|
|
||||||
@ -1199,7 +1199,7 @@ test_communicate_utf8_async_invalid (void)
|
|||||||
GSubprocessFlags flags = G_SUBPROCESS_FLAGS_STDOUT_PIPE;
|
GSubprocessFlags flags = G_SUBPROCESS_FLAGS_STDOUT_PIPE;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GPtrArray *args;
|
GPtrArray *args;
|
||||||
TestAsyncCommunicateData data = { flags, 0, };
|
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||||
GSubprocess *proc;
|
GSubprocess *proc;
|
||||||
GCancellable *cancellable = NULL;
|
GCancellable *cancellable = NULL;
|
||||||
|
|
||||||
|
@ -1183,7 +1183,7 @@ test_happy_eyeballs_both_error_delays_3 (HappyEyeballsFixture *fixture,
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
gint i;
|
gsize i;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
@ -1193,28 +1193,28 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (host_tests); i++)
|
for (i = 0; i < G_N_ELEMENTS (host_tests); i++)
|
||||||
{
|
{
|
||||||
path = g_strdup_printf ("/network-address/parse-host/%d", i);
|
path = g_strdup_printf ("/network-address/parse-host/%" G_GSIZE_FORMAT, i);
|
||||||
g_test_add_data_func (path, &host_tests[i], test_parse_host);
|
g_test_add_data_func (path, &host_tests[i], test_parse_host);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (uri_tests); i++)
|
for (i = 0; i < G_N_ELEMENTS (uri_tests); i++)
|
||||||
{
|
{
|
||||||
path = g_strdup_printf ("/network-address/parse-uri/%d", i);
|
path = g_strdup_printf ("/network-address/parse-uri/%" G_GSIZE_FORMAT, i);
|
||||||
g_test_add_data_func (path, &uri_tests[i], test_parse_uri);
|
g_test_add_data_func (path, &uri_tests[i], test_parse_uri);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (address_tests); i++)
|
for (i = 0; i < G_N_ELEMENTS (address_tests); i++)
|
||||||
{
|
{
|
||||||
path = g_strdup_printf ("/network-address/resolve-address/%d", i);
|
path = g_strdup_printf ("/network-address/resolve-address/%" G_GSIZE_FORMAT, i);
|
||||||
g_test_add_data_func (path, &address_tests[i], test_resolve_address);
|
g_test_add_data_func (path, &address_tests[i], test_resolve_address);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (address_tests); i++)
|
for (i = 0; i < G_N_ELEMENTS (address_tests); i++)
|
||||||
{
|
{
|
||||||
path = g_strdup_printf ("/gresolver/resolve-address/%d", i);
|
path = g_strdup_printf ("/gresolver/resolve-address/%" G_GSIZE_FORMAT, i);
|
||||||
g_test_add_data_func (path, &address_tests[i], test_resolve_address_gresolver);
|
g_test_add_data_func (path, &address_tests[i], test_resolve_address_gresolver);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user