From e7b44ef4c80907346ec7492a09c45277459924fc Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 19 Aug 2020 10:13:49 +0200 Subject: New upstream version 1.26.2 --- libnm-core/nm-setting-wireguard.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libnm-core/nm-setting-wireguard.c') diff --git a/libnm-core/nm-setting-wireguard.c b/libnm-core/nm-setting-wireguard.c index 2bd633ce..3b2815c0 100644 --- a/libnm-core/nm-setting-wireguard.c +++ b/libnm-core/nm-setting-wireguard.c @@ -592,13 +592,16 @@ nm_wireguard_peer_get_allowed_ip (const NMWireGuardPeer *self, { const char *s; + /* With LTO, the compiler might warn about the g_return_val_if_fail() + * code path not initializing the output argument. Workaround that by + * always setting the out argument. */ + NM_SET_OUT (out_is_valid, FALSE); + g_return_val_if_fail (NM_IS_WIREGUARD_PEER (self, TRUE), NULL); if ( !self->allowed_ips - || idx >= self->allowed_ips->len) { - NM_SET_OUT (out_is_valid, FALSE); + || idx >= self->allowed_ips->len) return NULL; - } s = self->allowed_ips->pdata[idx]; NM_SET_OUT (out_is_valid, s[0] != ALLOWED_IP_INVALID_X); -- cgit 1.3.0-6-gf8a5