Message-ID: <4cde32b9-c40a-74a4-84bd-ae365439d812@...1227...> Date: Thu, 6 Jul 2023 19:28:57 +0200 MIME-Version: 1.0 Content-Language: en-GB References: <20230706171922.752429-1-heiko@...2662...> From: Arne Schwabe In-Reply-To: <20230706171922.752429-1-heiko@...2662...> Subject: Re: [Openvpn-devel] [PATCH] work around false positive warning with mingw 12 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit To: Heiko Hund , openvpn-devel@lists.sourceforge.net Am 06.07.23 um 19:19 schrieb Heiko Hund: > When cross compiling for Windows with Ubuntu 23.04 mingw complains about > > route.c:344:26: warning: ‘special.S_un.S_addr’ may be used uninitialized > > which is wrong technically. However the workaround isn't really > intrusive and while there are other warnings caused by libtool, the > cmake mingw build completes with -Werror now. > > Change-Id: I8a0f59707570722eab41af2db76980ced04e6d54 > Signed-off-by: Heiko Hund > --- > src/openvpn/route.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/openvpn/route.c b/src/openvpn/route.c > index 0d04a5a3..0b369da4 100644 > --- a/src/openvpn/route.c > +++ b/src/openvpn/route.c > @@ -319,7 +319,7 @@ init_route(struct route_ipv4 *r, > const in_addr_t default_netmask = IPV4_NETMASK_HOST; > bool status; > int ret; > - struct in_addr special; > + struct in_addr special = {0}; > > CLEAR(*r); > r->option = ro; Good enough. Acked-By: Arne Schwabe