[glib: 1/7] Fix signedness warnings in tests/gobject/performance.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/7] Fix signedness warnings in tests/gobject/performance.c
- Date: Tue, 4 May 2021 09:43:33 +0000 (UTC)
commit 3b424d746ca5f1eb0473089e67065ecc50194851
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Fri Nov 20 21:30:02 2020 +0100
Fix signedness warnings in tests/gobject/performance.c
tests/gobject/performance.c: In function ‘find_test’:
tests/gobject/performance.c:1019:17: error: comparison of integer expressions of different signedness:
‘int’ and ‘long unsigned int’
1019 | for (i = 0; i < G_N_ELEMENTS (tests); i++)
| ^
tests/gobject/performance.c: In function ‘main’:
tests/gobject/performance.c:1054:21: error: comparison of integer expressions of different signedness:
‘int’ and ‘long unsigned int’
1054 | for (i = 0; i < G_N_ELEMENTS (tests); i++)
| ^
tests/gobject/performance.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests/gobject/performance.c b/tests/gobject/performance.c
index 163be58b4..40ab48a02 100644
--- a/tests/gobject/performance.c
+++ b/tests/gobject/performance.c
@@ -1015,7 +1015,7 @@ static PerformanceTest tests[] = {
static PerformanceTest *
find_test (const char *name)
{
- int i;
+ gsize i;
for (i = 0; i < G_N_ELEMENTS (tests); i++)
{
if (strcmp (tests[i].name, name) == 0)
@@ -1051,8 +1051,9 @@ main (int argc,
}
else
{
- for (i = 0; i < G_N_ELEMENTS (tests); i++)
- run_test (&tests[i]);
+ gsize k;
+ for (k = 0; k < G_N_ELEMENTS (tests); k++)
+ run_test (&tests[k]);
}
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]