mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-17 13:52:17 +01:00
gnativesocketaddress: Fix minor -Wsign-conversion warnings with socket sizes
There were no bugs here, but let’s add some assertions to document the explicit casts. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3405
This commit is contained in:
@@ -86,7 +86,8 @@ g_native_socket_address_get_native_size (GSocketAddress *address)
|
|||||||
|
|
||||||
addr = G_NATIVE_SOCKET_ADDRESS (address);
|
addr = G_NATIVE_SOCKET_ADDRESS (address);
|
||||||
|
|
||||||
return addr->priv->sockaddr_len;
|
g_assert (addr->priv->sockaddr_len <= G_MAXSSIZE);
|
||||||
|
return (gssize) addr->priv->sockaddr_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|||||||
Reference in New Issue
Block a user