diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2020-11-23 16:44:20 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2020-11-24 09:21:45 +0000 |
commit | 6e446931a809d2fc8c5799151740dfcdf9b6309e (patch) | |
tree | a65f1f76b6ae375729799759268509e468097c24 | |
parent | eafc6b257cadf4e4129d7011e6564f178ef704a3 (diff) | |
download | glib-6e446931a809d2fc8c5799151740dfcdf9b6309e.tar.gz |
tests: Add a test to avoid a set-but-unused variable
Spotted by `scan-build`.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r-- | glib/tests/timeout.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c index 47f00ba89..fc836f312 100644 --- a/glib/tests/timeout.c +++ b/glib/tests/timeout.c @@ -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: */ |