Fix signedness warnings in glib/tests/pattern.c

glib/tests/pattern.c: In function ‘main’:
glib/tests/pattern.c:218:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
  218 |   for (i = 0; i < G_N_ELEMENTS (compile_tests); i++)
      |                 ^
glib/tests/pattern.c:225:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
  225 |   for (i = 0; i < G_N_ELEMENTS (match_tests); i++)
      |                 ^
glib/tests/pattern.c:232:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
  232 |   for (i = 0; i < G_N_ELEMENTS (equal_tests); i++)
      |                 ^
This commit is contained in:
Emmanuel Fleury 2020-10-15 11:44:43 +02:00
parent be5d48fe77
commit 76b84c5f66

View File

@ -210,28 +210,28 @@ test_equal (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 (compile_tests); i++)
{
path = g_strdup_printf ("/pattern/compile/%d", i);
path = g_strdup_printf ("/pattern/compile/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &compile_tests[i], test_compilation);
g_free (path);
}
for (i = 0; i < G_N_ELEMENTS (match_tests); i++)
{
path = g_strdup_printf ("/pattern/match/%d", i);
path = g_strdup_printf ("/pattern/match/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &match_tests[i], test_match);
g_free (path);
}
for (i = 0; i < G_N_ELEMENTS (equal_tests); i++)
{
path = g_strdup_printf ("/pattern/equal/%d", i);
path = g_strdup_printf ("/pattern/equal/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &equal_tests[i], test_equal);
g_free (path);
}