mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
tests: Add an assertion to avoid a scan-build warning
This should avoid the warning: ``` ../../../glib/tests/mainloop.c:119:3: warning: Value stored to 'id' is never read id = g_source_attach (source, ctx); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
2e7d3dcf70
commit
12f8708928
@ -121,6 +121,7 @@ test_maincontext_basic (void)
|
|||||||
g_source_set_funcs (source, &funcs);
|
g_source_set_funcs (source, &funcs);
|
||||||
g_source_set_callback (source, cb, data, NULL);
|
g_source_set_callback (source, cb, data, NULL);
|
||||||
id = g_source_attach (source, ctx);
|
id = g_source_attach (source, ctx);
|
||||||
|
g_assert_cmpint (id, >, 0);
|
||||||
g_source_unref (source);
|
g_source_unref (source);
|
||||||
g_assert_true (g_source_remove_by_user_data (data));
|
g_assert_true (g_source_remove_by_user_data (data));
|
||||||
g_assert_false (g_source_remove_by_user_data ((gpointer)0x1234));
|
g_assert_false (g_source_remove_by_user_data ((gpointer)0x1234));
|
||||||
|
Loading…
Reference in New Issue
Block a user