mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Fix signedness warning in gio/gunixsocketaddress.c
gio/gunixsocketaddress.c: In function ‘g_unix_socket_address_to_native’: gio/gunixsocketaddress.c:217:15: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘gssize’ {aka ‘long int’} 217 | if (destlen < socklen) | ^
This commit is contained in:
parent
5fec112453
commit
1f23770bc3
@ -214,7 +214,8 @@ g_unix_socket_address_to_native (GSocketAddress *address,
|
||||
gssize socklen;
|
||||
|
||||
socklen = g_unix_socket_address_get_native_size (address);
|
||||
if (destlen < socklen)
|
||||
g_assert (socklen >= 0);
|
||||
if (destlen < (gsize) socklen)
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NO_SPACE,
|
||||
_("Not enough space for socket address"));
|
||||
|
Loading…
Reference in New Issue
Block a user