mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-16 07:03:34 +02:00
gsocketaddress: Add an assertion to help static analysis
The static analyser will check dynamic type assertions and assume that if they fail, the variable can either have the wrong type, or be NULL (which is correct). The analyser doesn’t know that other constraints in the API ensure the variable is non-NULL. Add a non-null assertion to help the static analyser and shut it up in this case. https://bugzilla.gnome.org/show_bug.cgi?id=113075
This commit is contained in:
@ -386,6 +386,8 @@ g_socket_address_connectable_proxy_enumerate (GSocketConnectable *connectable)
|
||||
{
|
||||
GSocketAddressEnumerator *addr_enum = NULL;
|
||||
|
||||
g_assert (connectable != NULL);
|
||||
|
||||
if (G_IS_INET_SOCKET_ADDRESS (connectable) &&
|
||||
!G_IS_PROXY_ADDRESS (connectable))
|
||||
{
|
||||
|
Reference in New Issue
Block a user