Fix signedness warnings in glib/tests/shell.c

glib/tests/shell.c: In function ‘main’:
glib/tests/shell.c:194:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
  194 |   for (i = 0; i < G_N_ELEMENTS (cmdline_tests); i++)
      |                 ^
glib/tests/shell.c:201:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
  201 |   for (i = 0; i < G_N_ELEMENTS (quote_tests); i++)
      |                 ^
glib/tests/shell.c:208:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
  208 |   for (i = 0; i < G_N_ELEMENTS (unquote_tests); i++)
      |                 ^
This commit is contained in:
Emmanuel Fleury 2020-11-14 13:21:11 +01:00
parent f4bfc50db3
commit 82be350f59

View File

@ -186,28 +186,28 @@ do_unquote_test (gconstpointer d)
int
main (int argc, char *argv[])
{
gint i;
gsize i;
gchar *path;
g_test_init (&argc, &argv, NULL);
for (i = 0; i < G_N_ELEMENTS (cmdline_tests); i++)
{
path = g_strdup_printf ("/shell/cmdline/%d", i);
path = g_strdup_printf ("/shell/cmdline/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &cmdline_tests[i], do_cmdline_test);
g_free (path);
}
for (i = 0; i < G_N_ELEMENTS (quote_tests); i++)
{
path = g_strdup_printf ("/shell/quote/%d", i);
path = g_strdup_printf ("/shell/quote/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &quote_tests[i], do_quote_test);
g_free (path);
}
for (i = 0; i < G_N_ELEMENTS (unquote_tests); i++)
{
path = g_strdup_printf ("/shell/unquote/%d", i);
path = g_strdup_printf ("/shell/unquote/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &unquote_tests[i], do_unquote_test);
g_free (path);
}