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); } diff --git a/glib/tests/strfuncs.c b/glib/tests/strfuncs.c index 6c0d43090..cc7d9c211 100644 --- a/glib/tests/strfuncs.c +++ b/glib/tests/strfuncs.c @@ -2593,20 +2593,21 @@ static void test_set_str (void) { char *str = NULL; + const char *empty_str = ""; g_assert_false (g_set_str (&str, NULL)); g_assert_null (str); - g_assert_true (g_set_str (&str, "")); - g_assert_false (g_set_str (&str, "")); + g_assert_true (g_set_str (&str, empty_str)); + g_assert_false (g_set_str (&str, empty_str)); g_assert_nonnull (str); - g_assert_true ((gpointer)str != (gpointer)""); - g_assert_cmpstr (str, ==, ""); + g_assert_true ((gpointer)str != (gpointer)empty_str); + g_assert_cmpstr (str, ==, empty_str); g_assert_true (g_set_str (&str, NULL)); g_assert_null (str); - g_assert_true (g_set_str (&str, "")); + g_assert_true (g_set_str (&str, empty_str)); g_assert_true (g_set_str (&str, "test")); g_assert_cmpstr (str, ==, "test");