tests: Add a test to avoid a set-but-unused variable

Spotted by `scan-build`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2020-11-23 16:44:20 +00:00
parent eafc6b257c
commit 6e446931a8

View File

@ -126,6 +126,8 @@ test_far_future_ready_time (void)
n_fds = 0;
n_fds = g_main_context_query (context, priority, &timeout_, NULL, n_fds);
g_assert_cmpint (n_fds, >=, 0);
/* The true timeout in milliseconds doesn't fit into a gint. We definitely
* don't want poll() to block forever:
*/