[Openvpn-devel] repair windows builds (2.4)

Message ID 20190705130001.30741-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel] repair windows builds (2.4) | expand

Commit Message

Gert Doering July 5, 2019, 3 a.m. UTC
commit 0c1cc8d65539f removed "DWORD len;" from service_enable_dhcp(),
but that variable is far from "unused" - breaking compilation.

The problem here was that it's a larger "cleanup compiler warnings"
patch which was fully correct for master, but this particular function
looks different in release/2.4 because the whole iservice call
refactoring patch isn't in release/2.4 - so master does not need the
DWORD len, but release/2.4 does.

More care needed with "warning cleanup"...

Signed-off-by: Gert Doering <gert@greenie.muc.de>
---
 src/openvpn/tun.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Arne Schwabe July 5, 2019, 3:16 a.m. UTC | #1
Am 05.07.19 um 15:00 schrieb Gert Doering:
> commit 0c1cc8d65539f removed "DWORD len;" from service_enable_dhcp(),
> but that variable is far from "unused" - breaking compilation.
> 
> The problem here was that it's a larger "cleanup compiler warnings"
> patch which was fully correct for master, but this particular function
> looks different in release/2.4 because the whole iservice call
> refactoring patch isn't in release/2.4 - so master does not need the
> DWORD len, but release/2.4 does.
> 
> More care needed with "warning cleanup"...

Acked-By: Arne Schwabe <arne@rfc2549.org>

I have neither compile tested nor tested the patch itself but since len
is really used here, the patch will improve things for the better.

Arne
Gert Doering July 5, 2019, 3:36 a.m. UTC | #2
Your patch has been applied to the release/2.4 branch.

commit 5b1d07906073702b9fb23ca97f69bc8ba324f609
Author: Gert Doering
Date:   Fri Jul 5 15:00:01 2019 +0200

     repair windows builds (2.4)

     Signed-off-by: Gert Doering <gert@greenie.muc.de>
     Acked-by: Arne Schwabe <arne@rfc2549.org>
     Message-Id: <20190705130001.30741-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18652.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 9b830285..80eaa2c4 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -5374,6 +5374,7 @@  netsh_enable_dhcp(const char *actual_name)
 static bool
 service_enable_dhcp(const struct tuntap *tt)
 {
+    DWORD len;
     bool ret = false;
     ack_message_t ack;
     struct gc_arena gc = gc_new();