Message ID | 20230203191440.136050-2-frank@lichtenheld.com |
---|---|
State | Accepted |
Headers | show |
Series | Allow mingw builds with -Werror | expand |
I haven't tested it in the MinGW environment, but checked the code in MSVC and ensured that setenv_foreign_option is indeed not used at all in Win32. 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/options.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/openvpn/options.c b/src/openvpn/options.c > index 6ae3faf8..ab1b01cf 100644 > --- a/src/openvpn/options.c > +++ b/src/openvpn/options.c > @@ -1041,6 +1041,7 @@ setenv_settings(struct env_set *es, const struct options *o) > } > } > > +#ifndef _WIN32 > static void > setenv_foreign_option(struct options *o, const char *argv[], int len, struct env_set *es) > { > @@ -1078,6 +1079,7 @@ setenv_foreign_option(struct options *o, const char *argv[], int len, struct env > gc_free(&gc); > } > } > +#endif /* ifndef _WIN32 */ > > static in_addr_t > get_ip_addr(const char *ip_string, int msglevel, bool *error) > -- > 2.34.1 > > > > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Tested on plain linux (which needs setenv_foreign_option) and MingW (which no longer warns) compile. Trivial enough. Your patch has been applied to the master and release/2.6 branch. commit 8aeec3aa36873489d3e708ae694c57e59b4302ef (master) commit b9d35055eae676790f3bc214c00a01f756b0cd55 (release/2.6) Author: Frank Lichtenheld Date: Fri Feb 3 20:14:36 2023 +0100 Windows: fix unused function setenv_foreign_option Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Lev Stipakov <lstipakov@gmail.com> Message-Id: <20230203191440.136050-2-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26145.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 6ae3faf8..ab1b01cf 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1041,6 +1041,7 @@ setenv_settings(struct env_set *es, const struct options *o) } } +#ifndef _WIN32 static void setenv_foreign_option(struct options *o, const char *argv[], int len, struct env_set *es) { @@ -1078,6 +1079,7 @@ setenv_foreign_option(struct options *o, const char *argv[], int len, struct env gc_free(&gc); } } +#endif /* ifndef _WIN32 */ static in_addr_t get_ip_addr(const char *ip_string, int msglevel, bool *error)
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> --- src/openvpn/options.c | 2 ++ 1 file changed, 2 insertions(+)