[glib: 4/6] Fix several signedness warnings in glib/tests/array-test.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/6] Fix several signedness warnings in glib/tests/array-test.c
- Date: Wed, 14 Oct 2020 14:10:07 +0000 (UTC)
commit 019c6746db1de8149ecc9e8cb6d311af8e1b9ee1
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Fri Sep 11 18:22:22 2020 +0200
Fix several signedness warnings in glib/tests/array-test.c
glib/tests/array-test.c: In function ‘array_remove_index’:
glib/tests/array-test.c:388:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
388 | for (i = 0; i < garray->len; i++)
| ^
glib/tests/array-test.c: In function ‘array_remove_index_fast’:
glib/tests/array-test.c:425:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
425 | for (i = 0; i < garray->len; i++)
| ^
glib/tests/array-test.c: In function ‘array_remove_range’:
glib/tests/array-test.c:462:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
462 | for (i = 0; i < garray->len; i++)
| ^
glib/tests/array-test.c: In function ‘array_sort’:
glib/tests/array-test.c:604:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
604 | for (i = 0; i < garray->len; i++)
| ^
glib/tests/array-test.c: In function ‘array_sort_with_data’:
glib/tests/array-test.c:636:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
636 | for (i = 0; i < garray->len; i++)
| ^
glib/tests/array-test.c: In function ‘byte_array_sort’:
glib/tests/array-test.c:1876:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
1876 | for (i = 0; i < gbarray->len; i++)
| ^
glib/tests/array-test.c: In function ‘byte_array_sort_with_data’:
glib/tests/array-test.c:1904:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
1904 | for (i = 0; i < gbarray->len; i++)
| ^
glib/tests/array-test.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c
index 745cf8b6a..8fd76693b 100644
--- a/glib/tests/array-test.c
+++ b/glib/tests/array-test.c
@@ -366,7 +366,7 @@ array_remove_index (gconstpointer test_data)
{
const ArrayTestData *config = test_data;
GArray *garray;
- gint i;
+ guint i;
gint prev, cur;
garray = g_array_new (config->zero_terminated, config->clear_, sizeof (gint));
@@ -403,7 +403,7 @@ array_remove_index_fast (gconstpointer test_data)
{
const ArrayTestData *config = test_data;
GArray *garray;
- gint i;
+ guint i;
gint prev, cur;
garray = g_array_new (config->zero_terminated, config->clear_, sizeof (gint));
@@ -443,7 +443,7 @@ array_remove_range (gconstpointer test_data)
{
const ArrayTestData *config = test_data;
GArray *garray;
- gint i;
+ guint i;
gint prev, cur;
garray = g_array_new (config->zero_terminated, config->clear_, sizeof (gint));
@@ -586,7 +586,7 @@ array_sort (gconstpointer test_data)
{
const ArrayTestData *config = test_data;
GArray *garray;
- gint i;
+ guint i;
gint prev, cur;
garray = g_array_new (config->zero_terminated, config->clear_, sizeof (gint));
@@ -618,7 +618,7 @@ array_sort_with_data (gconstpointer test_data)
{
const ArrayTestData *config = test_data;
GArray *garray;
- gint i;
+ guint i;
gint prev, cur;
garray = g_array_new (config->zero_terminated, config->clear_, sizeof (gint));
@@ -1859,7 +1859,7 @@ static void
byte_array_sort (void)
{
GByteArray *gbarray;
- gint i;
+ guint i;
guint8 val;
guint8 prev, cur;
@@ -1887,7 +1887,7 @@ static void
byte_array_sort_with_data (void)
{
GByteArray *gbarray;
- gint i;
+ guint i;
guint8 val;
guint8 prev, cur;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]