[glib: 4/8] Fix several signedness warnings in tests/testglib.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/8] Fix several signedness warnings in tests/testglib.c
- Date: Thu, 6 May 2021 16:43:22 +0000 (UTC)
commit 65d93a16ab7c9ec5ba54ad60831f1599c58c7612
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Fri Nov 20 22:18:19 2020 +0100
Fix several signedness warnings in tests/testglib.c
tests/testglib.c: In function ‘glist_test’:
tests/testglib.c:90:30: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
90 | if (*((gint*) t->data) != (9 - i))
| ^~
tests/testglib.c:95:54: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
95 | if (g_list_position (list, g_list_nth (list, i)) != i)
| ^~
tests/testglib.c:112:30: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
112 | if (*((gint*) t->data) != i)
| ^~
tests/testglib.c:130:30: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
130 | if (*((gint*) t->data) != (9 - i))
| ^~
tests/testglib.c:150:30: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
150 | if (*((gint*) t->data) != (9 - i))
| ^~
tests/testglib.c: In function ‘gslist_test’:
tests/testglib.c:170:31: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
170 | if (*((gint*) st->data) != (9 - i))
| ^~
tests/testglib.c:188:31: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
188 | if (*((gint*) st->data) != i)
| ^~
tests/testglib.c:206:31: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
206 | if (*((gint*) st->data) != (9 - i))
| ^~
tests/testglib.c:226:31: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
226 | if (*((gint*) st->data) != (9 - i))
| ^~
tests/testglib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/testglib.c b/tests/testglib.c
index 86c807922..926010e5d 100644
--- a/tests/testglib.c
+++ b/tests/testglib.c
@@ -78,7 +78,7 @@ static void
glist_test (void)
{
GList *list = NULL;
- guint i;
+ gint i;
for (i = 0; i < 10; i++)
list = g_list_append (list, &test_nums[i]);
@@ -158,7 +158,7 @@ static void
gslist_test (void)
{
GSList *slist = NULL;
- guint i;
+ gint i;
for (i = 0; i < 10; i++)
slist = g_slist_append (slist, &test_nums[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]