[glib: 5/15] Fix signedness warnings in glib/tests/markup-escape.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/15] Fix signedness warnings in glib/tests/markup-escape.c
- Date: Sat, 14 Nov 2020 11:51:56 +0000 (UTC)
commit d15260ee6989d3c6d6e403e7dca76fddef557132
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Thu Oct 15 10:36:36 2020 +0200
Fix signedness warnings in glib/tests/markup-escape.c
glib/tests/markup-escape.c: In function ‘main’:
glib/tests/markup-escape.c:152:17: error: comparison of integer expressions of different signedness:
‘gint’ {aka ‘int’} and ‘long unsigned int’
152 | for (i = 0; i < G_N_ELEMENTS (escape_tests); i++)
| ^
../glib.git/glib/tests/markup-escape.c:159:17: error: comparison of integer expressions of different
signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’
159 | for (i = 0; i < G_N_ELEMENTS (unichar_tests); i++)
| ^
glib/tests/markup-escape.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/tests/markup-escape.c b/glib/tests/markup-escape.c
index 2d5de854d..44290fed9 100644
--- a/glib/tests/markup-escape.c
+++ b/glib/tests/markup-escape.c
@@ -144,21 +144,21 @@ format_test (void)
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 (escape_tests); i++)
{
- path = g_strdup_printf ("/markup/escape-text/%d", i);
+ path = g_strdup_printf ("/markup/escape-text/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &escape_tests[i], escape_test);
g_free (path);
}
for (i = 0; i < G_N_ELEMENTS (unichar_tests); i++)
{
- path = g_strdup_printf ("/markup/escape-unichar/%d", i);
+ path = g_strdup_printf ("/markup/escape-unichar/%" G_GSIZE_FORMAT, i);
g_test_add_data_func (path, &unichar_tests[i], unichar_test);
g_free (path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]