From 8341a1cf064b628d57bfed46fbfb14e810ddf265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 24 Oct 2022 21:33:18 +0200 Subject: [PATCH] tests/sequence: Ensure iterator is set and actually checked Clang was complaining: ../glib/tests/sequence.c:125:7: warning: variable 'i' set but not used int i; ^ 1 warning generated. --- glib/tests/sequence.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glib/tests/sequence.c b/glib/tests/sequence.c index 842bc5435..5cf0b415a 100644 --- a/glib/tests/sequence.c +++ b/glib/tests/sequence.c @@ -122,7 +122,7 @@ check_integrity (SequenceInfo *info) { GList *list; GSequenceIter *iter; - int i; + unsigned int i; g_sequence_check (info->sequence); @@ -149,6 +149,7 @@ check_integrity (SequenceInfo *info) i++; } + g_assert_cmpuint (i, ==, info->n_items); g_assert (info->n_items == g_queue_get_length (info->queue)); g_assert ((guint) g_sequence_get_length (info->sequence) == info->n_items); }