mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01: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:
parent
c729f416fb
commit
956c58c7f2
@ -386,6 +386,8 @@ g_socket_address_connectable_proxy_enumerate (GSocketConnectable *connectable)
|
|||||||
{
|
{
|
||||||
GSocketAddressEnumerator *addr_enum = NULL;
|
GSocketAddressEnumerator *addr_enum = NULL;
|
||||||
|
|
||||||
|
g_assert (connectable != NULL);
|
||||||
|
|
||||||
if (G_IS_INET_SOCKET_ADDRESS (connectable) &&
|
if (G_IS_INET_SOCKET_ADDRESS (connectable) &&
|
||||||
!G_IS_PROXY_ADDRESS (connectable))
|
!G_IS_PROXY_ADDRESS (connectable))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user