Fix signedness warning in gio/tests/socket.c

gio/tests/socket.c: In function ‘test_get_available’:
gio/tests/socket.c:1696:53: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘long unsigned int’
 1696 |           if (g_socket_get_available_bytes (server) > sizeof (data))
      |                                                     ^
This commit is contained in:
Emmanuel Fleury 2020-11-19 19:56:54 +01:00
parent 5595b65476
commit 0a741d85a7

View File

@ -1694,7 +1694,8 @@ test_get_available (gconstpointer user_data)
for (tries = 0; tries < 100; tries++)
{
if (g_socket_get_available_bytes (server) > sizeof (data))
gssize res = g_socket_get_available_bytes (server);
if ((res == -1) || ((gsize) res > sizeof (data)))
break;
g_usleep (100000);
}