mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
Merge branch 'wip/3v1n0/clang-warning-fixes' into 'main'
tests: Fix few new clang warnings See merge request GNOME/glib!3013
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -2593,20 +2593,21 @@ static void
|
|||||||
test_set_str (void)
|
test_set_str (void)
|
||||||
{
|
{
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
|
const char *empty_str = "";
|
||||||
|
|
||||||
g_assert_false (g_set_str (&str, NULL));
|
g_assert_false (g_set_str (&str, NULL));
|
||||||
g_assert_null (str);
|
g_assert_null (str);
|
||||||
|
|
||||||
g_assert_true (g_set_str (&str, ""));
|
g_assert_true (g_set_str (&str, empty_str));
|
||||||
g_assert_false (g_set_str (&str, ""));
|
g_assert_false (g_set_str (&str, empty_str));
|
||||||
g_assert_nonnull (str);
|
g_assert_nonnull (str);
|
||||||
g_assert_true ((gpointer)str != (gpointer)"");
|
g_assert_true ((gpointer)str != (gpointer)empty_str);
|
||||||
g_assert_cmpstr (str, ==, "");
|
g_assert_cmpstr (str, ==, empty_str);
|
||||||
|
|
||||||
g_assert_true (g_set_str (&str, NULL));
|
g_assert_true (g_set_str (&str, NULL));
|
||||||
g_assert_null (str);
|
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_true (g_set_str (&str, "test"));
|
||||||
g_assert_cmpstr (str, ==, "test");
|
g_assert_cmpstr (str, ==, "test");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user