The static analyser (correctly) considers a type check to fail if the
variable is NULL. In this case, the address must be non-NULL as no error
was thrown by g_socket_connection_get_remote_address(), but the static
analyser doesn’t know this.
Add a non-NULL assertion anyway, both to shut the analyser up, and
because it’s good extra testing.
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=113075
addr = g_socket_connection_get_remote_address (conn, &error);
g_assert_no_error (error);
- g_assert (!G_IS_PROXY_ADDRESS (addr));
+ g_assert (addr != NULL && !G_IS_PROXY_ADDRESS (addr));
g_object_unref (addr);
addr = g_socket_connection_get_local_address (conn, &error);