diff options
author | Arne Schwabe | 2021-04-21 15:43:45 +0200 |
---|---|---|
committer | Gert Doering | 2021-04-22 16:33:23 +0200 |
commit | 7890e51aab91b304045a0163462f334b8e5ae8e8 (patch) | |
tree | 1d402f881d86de72eb0176392edf7bbdb2449a00 /src/openvpn/socket.c | |
parent | 3a16a8678ded8df8e41c495bccc4e24ef0ce82f4 (diff) | |
download | openvpn-7890e51aab91b304045a0163462f334b8e5ae8e8.zip openvpn-7890e51aab91b304045a0163462f334b8e5ae8e8.tar.gz |
Fix a number of mingw warnings
Move to definition inside the ifdef where they are used to avoid
unused warnings.
Fix a few printf related warnings when DWORD is used as paramter and
the printf format should be %lu (long unsigned int)
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20210421134348.1950392-4-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22176.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/socket.c')
-rw-r--r-- | src/openvpn/socket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index b13d2e0..8a6e42c 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -2837,10 +2837,11 @@ print_link_socket_actual_ex(const struct link_socket_actual *act, { if (act) { - char ifname[IF_NAMESIZE] = "[undef]"; struct buffer out = alloc_buf_gc(128, gc); buf_printf(&out, "%s", print_sockaddr_ex(&act->dest.addr.sa, separator, flags, gc)); #if ENABLE_IP_PKTINFO + char ifname[IF_NAMESIZE] = "[undef]"; + if ((flags & PS_SHOW_PKTINFO) && addr_defined_ipi(act)) { switch (act->dest.addr.sa.sa_family) |