Skip to content

Commit e8dc7f3

Browse files
flichtenheldcron2
authored andcommitted
socket: Initialize struct in_addr_t in getaddr()
We have false-positive "‘addr’ may be used uninitialized" warnings with MinGW 13.0.0 compiler. Work around them. Change-Id: I999916f9561a638214b70cf43de78060e9e0e792 Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1420 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34894.html Signed-off-by: Gert Doering <[email protected]>
1 parent 9a2420f commit e8dc7f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openvpn/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ in_addr_t
202202
getaddr(unsigned int flags, const char *hostname, int resolve_retry_seconds, bool *succeeded,
203203
struct signal_info *sig_info)
204204
{
205-
in_addr_t addr;
205+
in_addr_t addr = { 0 };
206206
int status;
207207

208208
status = get_addr_generic(AF_INET, flags, hostname, &addr, NULL, resolve_retry_seconds,

0 commit comments

Comments
 (0)