Fix global variable name hidden by local variables in glib/tests/utf8-validate.c

This commit is contained in:
Loïc Le Page 2022-02-21 12:38:11 +01:00
parent 8f241c46b9
commit cbc3d65f6d

View File

@ -32,7 +32,7 @@ typedef struct {
gboolean valid; gboolean valid;
} Test; } Test;
Test test[] = { static Test global_test[] = {
/* some tests to check max_len handling */ /* some tests to check max_len handling */
/* length 1 */ /* length 1 */
{ "abcde", -1, 5, TRUE }, { "abcde", -1, 5, TRUE },
@ -364,10 +364,10 @@ main (int argc, char *argv[])
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
for (i = 0; test[i].text; i++) for (i = 0; global_test[i].text; i++)
{ {
path = g_strdup_printf ("/utf8/validate/%d", i); path = g_strdup_printf ("/utf8/validate/%d", i);
g_test_add_data_func (path, &test[i], do_test); g_test_add_data_func (path, &global_test[i], do_test);
g_free (path); g_free (path);
} }