diff --git a/glib/tests/queue.c b/glib/tests/queue.c index dd9dd2127..e77821372 100644 --- a/glib/tests/queue.c +++ b/glib/tests/queue.c @@ -14,7 +14,7 @@ check_integrity (GQueue *queue) GList *last; GList *links; GList *link; - gint n; + guint n; g_assert (queue->length < 4000000000u); @@ -266,7 +266,7 @@ random_test (gconstpointer d) break; case GET_LENGTH: { - int l; + guint l; l = g_queue_get_length (q); @@ -416,13 +416,13 @@ random_test (gconstpointer d) int n = get_random_position (q, TRUE); gpointer elm = g_queue_peek_nth (q, n); - if (n == q->length - 1) + if (n == (int) (q->length - 1)) qinf->tail = qinf->tail->prev; if (n == 0) qinf->head = qinf->head->next; - if (n >= 0 && n < q->length) + if (n >= 0 && (guint) n < q->length) qinf->length--; g_assert (elm == g_queue_pop_nth (q, n)); @@ -450,7 +450,7 @@ random_test (gconstpointer d) { GList *list; int n = get_random_position (q, TRUE); - if (n < 0 || n >= q->length) + if (n < 0 || (guint) n >= q->length) { g_assert (g_queue_peek_nth (q, n) == NULL); } @@ -637,7 +637,7 @@ random_test (gconstpointer d) { int n = get_random_position (q, FALSE); - if (n == g_queue_get_length (q) - 1) + if (n == (int) (g_queue_get_length (q) - 1)) qinf->tail = qinf->tail->prev; if (n == 0)