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.
This commit is contained in:
Marco Trevisan (Treviño) 2022-10-24 21:33:18 +02:00
parent 8fe2e4d364
commit 8341a1cf06

View File

@ -122,7 +122,7 @@ check_integrity (SequenceInfo *info)
{ {
GList *list; GList *list;
GSequenceIter *iter; GSequenceIter *iter;
int i; unsigned int i;
g_sequence_check (info->sequence); g_sequence_check (info->sequence);
@ -149,6 +149,7 @@ check_integrity (SequenceInfo *info)
i++; i++;
} }
g_assert_cmpuint (i, ==, info->n_items);
g_assert (info->n_items == g_queue_get_length (info->queue)); g_assert (info->n_items == g_queue_get_length (info->queue));
g_assert ((guint) g_sequence_get_length (info->sequence) == info->n_items); g_assert ((guint) g_sequence_get_length (info->sequence) == info->n_items);
} }