mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01: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:
commit
e562c3b8a3
@ -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);
|
||||
}
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user