mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36: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;
|
||||
guint8 v, *out;
|
||||
int i;
|
||||
gsize i;
|
||||
gsize block_size;
|
||||
|
||||
in = inbuf;
|
||||
@ -210,7 +210,7 @@ g_compressor_converter_convert (GConverter *converter,
|
||||
{
|
||||
const guint8 *in, *in_end;
|
||||
guint8 v, *out;
|
||||
int i;
|
||||
gsize i;
|
||||
gsize block_size;
|
||||
|
||||
in = inbuf;
|
||||
@ -231,7 +231,7 @@ g_compressor_converter_convert (GConverter *converter,
|
||||
block_size = v * 1000;
|
||||
|
||||
/* Not enough data */
|
||||
if (in_end - in < block_size)
|
||||
if ((gsize) (in_end - in) < block_size)
|
||||
{
|
||||
if (*bytes_read > 0)
|
||||
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)
|
||||
break;
|
||||
@ -297,7 +297,7 @@ test_expander (void)
|
||||
GConverter *expander;
|
||||
GConverter *converter;
|
||||
GError *error;
|
||||
int i;
|
||||
gsize i;
|
||||
|
||||
expander = g_expander_converter_new ();
|
||||
|
||||
@ -393,7 +393,7 @@ test_compressor (void)
|
||||
GOutputStream *mem_out, *cstream_out;
|
||||
GConverter *expander, *compressor;
|
||||
GError *error;
|
||||
int i;
|
||||
gsize i;
|
||||
|
||||
expander = g_expander_converter_new ();
|
||||
expanded = g_malloc (100*1000); /* Large enough */
|
||||
@ -972,7 +972,7 @@ test_converter_pollable (void)
|
||||
GPollableOutputStream *pollable_out;
|
||||
GConverter *expander, *compressor;
|
||||
GError *error;
|
||||
int i;
|
||||
gsize i;
|
||||
|
||||
expander = g_expander_converter_new ();
|
||||
expanded = g_malloc (100*1000); /* Large enough */
|
||||
|
@ -771,7 +771,7 @@ test_communicate_async (gconstpointer test_data)
|
||||
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
||||
GError *error = NULL;
|
||||
GPtrArray *args;
|
||||
TestAsyncCommunicateData data = { flags, 0, };
|
||||
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||
GSubprocess *proc;
|
||||
GCancellable *cancellable = NULL;
|
||||
GBytes *input;
|
||||
@ -1022,7 +1022,7 @@ test_communicate_utf8_async (gconstpointer test_data)
|
||||
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
||||
GError *error = NULL;
|
||||
GPtrArray *args;
|
||||
TestAsyncCommunicateData data = { flags, 0, };
|
||||
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||
GSubprocess *proc;
|
||||
GCancellable *cancellable = NULL;
|
||||
|
||||
@ -1055,7 +1055,7 @@ test_communicate_utf8_cancelled_async (gconstpointer test_data)
|
||||
GSubprocessFlags flags = GPOINTER_TO_INT (test_data);
|
||||
GError *error = NULL;
|
||||
GPtrArray *args;
|
||||
TestAsyncCommunicateData data = { flags, 0, };
|
||||
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||
GSubprocess *proc;
|
||||
GCancellable *cancellable = NULL;
|
||||
|
||||
@ -1199,7 +1199,7 @@ test_communicate_utf8_async_invalid (void)
|
||||
GSubprocessFlags flags = G_SUBPROCESS_FLAGS_STDOUT_PIPE;
|
||||
GError *error = NULL;
|
||||
GPtrArray *args;
|
||||
TestAsyncCommunicateData data = { flags, 0, };
|
||||
TestAsyncCommunicateData data = { flags, 0, 0, NULL };
|
||||
GSubprocess *proc;
|
||||
GCancellable *cancellable = NULL;
|
||||
|
||||
|
@ -1183,7 +1183,7 @@ test_happy_eyeballs_both_error_delays_3 (HappyEyeballsFixture *fixture,
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
gint i;
|
||||
gsize i;
|
||||
gchar *path;
|
||||
|
||||
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++)
|
||||
{
|
||||
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_free (path);
|
||||
}
|
||||
|
||||
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_free (path);
|
||||
}
|
||||
|
||||
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_free (path);
|
||||
}
|
||||
|
||||
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_free (path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user