Message ID | 20230203191440.136050-5-frank@lichtenheld.com |
---|---|
State | Accepted |
Headers | show |
Series | Allow mingw builds with -Werror | expand |
Clear enough. Acked-by: Lev Stipakov <lstipakov@gmail.com> pe 3. helmik. 2023 klo 21.15 Frank Lichtenheld (frank@lichtenheld.com) kirjoitti: > > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> > --- > src/openvpn/win32.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c > index 44176936..ad3d9bf6 100644 > --- a/src/openvpn/win32.c > +++ b/src/openvpn/win32.c > @@ -1358,7 +1358,6 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) > > USHORT process_machine = 0; > USHORT native_machine = 0; > - BOOL is_wow64 = FALSE; > > #ifdef _ARM64_ > *process_arch = ARCH_ARM64; > @@ -1380,8 +1379,8 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) > if (is_wow64_process2) > { > /* check if we're running on arm64 or amd64 machine */ > - is_wow64 = is_wow64_process2(GetCurrentProcess(), > - &process_machine, &native_machine); > + BOOL is_wow64 = is_wow64_process2(GetCurrentProcess(), > + &process_machine, &native_machine); > if (is_wow64) > { > switch (native_machine) > @@ -1403,7 +1402,7 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) > else > { > BOOL w64 = FALSE; > - is_wow64 = IsWow64Process(GetCurrentProcess(), &w64) && w64; > + BOOL is_wow64 = IsWow64Process(GetCurrentProcess(), &w64) && w64; > if (is_wow64) > { > /* we are unable to differentiate between arm64 and amd64 > -- > 2.34.1 > > > > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel
"Clear enough", indeed. Test compiled on MinGW. Your patch has been applied to the master and release/2.6 branch. commit 2dc2d16559b41d56f662d7cd69ea547e804e27b8 (master) commit 4718af50bb7b5a913ae4befb2d3a8dd338b3eb74 (release/2.6) Author: Frank Lichtenheld Date: Fri Feb 3 20:14:39 2023 +0100 Windows: fix unused variable in win32_get_arch Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Lev Stipakov <lstipakov@gmail.com> Message-Id: <20230203191440.136050-5-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26141.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index 44176936..ad3d9bf6 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -1358,7 +1358,6 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) USHORT process_machine = 0; USHORT native_machine = 0; - BOOL is_wow64 = FALSE; #ifdef _ARM64_ *process_arch = ARCH_ARM64; @@ -1380,8 +1379,8 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) if (is_wow64_process2) { /* check if we're running on arm64 or amd64 machine */ - is_wow64 = is_wow64_process2(GetCurrentProcess(), - &process_machine, &native_machine); + BOOL is_wow64 = is_wow64_process2(GetCurrentProcess(), + &process_machine, &native_machine); if (is_wow64) { switch (native_machine) @@ -1403,7 +1402,7 @@ win32_get_arch(arch_t *process_arch, arch_t *host_arch) else { BOOL w64 = FALSE; - is_wow64 = IsWow64Process(GetCurrentProcess(), &w64) && w64; + BOOL is_wow64 = IsWow64Process(GetCurrentProcess(), &w64) && w64; if (is_wow64) { /* we are unable to differentiate between arm64 and amd64
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> --- src/openvpn/win32.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)