From 019c6746db1de8149ecc9e8cb6d311af8e1b9ee1 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Fri, 11 Sep 2020 18:22:22 +0200 Subject: [PATCH] Fix several signedness warnings in glib/tests/array-test.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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;