tests: Silence a warning

In case the OS does not support epoll and kqueue, we get the warning:

gio/tests/pollable.c: In function ‘test_pollable_unix_nulldev’:
gio/tests/pollable.c:266:7: warning: unused variable ‘fd’
[-Wunused-variable]
  266 |   int fd;

Get rid of it.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
This commit is contained in:
Sergey Bugaev 2023-01-24 19:37:58 +03:00
parent 718f05d090
commit c121118bc4

View File

@ -263,14 +263,12 @@ test_pollable_unix_file (void)
static void
test_pollable_unix_nulldev (void)
{
int fd;
g_test_summary ("Test that /dev/null is not considered pollable, but only if "
"on a system where we are able to tell it apart from devices "
"that actually implement poll");
#if defined (HAVE_EPOLL_CREATE) || defined (HAVE_KQUEUE)
fd = g_open ("/dev/null", O_RDWR, 0);
int fd = g_open ("/dev/null", O_RDWR, 0);
g_assert_cmpint (fd, !=, -1);
g_assert_not_pollable (fd);