From: "cron2 (Code Review)"
Date: Sat, 13 Dec 2025 12:29:59 +0000
In-Reply-To:
References:
Reply-To: gert@...1296..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...
Message-ID: <85d4bbcf86bcf1691df2d61b81bbbf21d421e438-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="my7b2XY5ZcY="; charset=UTF-8
Subject: [Openvpn-devel] [S] Change in openvpn[master]: options: Avoid some
conversion warnings
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: flichtenheld , plaisthos
Cc: openvpn-devel
--my7b2XY5ZcY=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 has uploaded a new patch set (#2) to the change originally created by=
flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1440?usp=3Demail )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: options: Avoid some conversion warnings
......................................................................
options: Avoid some conversion warnings
Just use the correct types.
Change-Id: I02db40d7335df7ab037ae1deb3e20f25a9b199bd
Signed-off-by: Frank Lichtenheld
Acked-by: Gert Doering
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1440
Message-Id: <20251213084225.30988-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35=
061.html
Signed-off-by: Gert Doering
---
M src/openvpn/options.c
M src/openvpn/options.h
2 files changed, 2 insertions(+), 11 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/40/1440/2
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 24c3e92..34af0d3 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -1154,13 +1154,8 @@
return get_ipv6_addr(ipv6_prefix_spec, &t_addr, &t_bits, M_WARN);
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
static char *
-string_substitute(const char *src, int from, int to, struct gc_arena *gc)
+string_substitute(const char *src, char from, char to, struct gc_arena *gc)
{
char *ret =3D (char *)gc_malloc(strlen(src) + 1, true, gc);
char *dest =3D ret;
@@ -9306,10 +9301,6 @@
gc_free(&gc);
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
bool
has_udp_in_local_list(const struct options *options)
{
diff --git a/src/openvpn/options.h b/src/openvpn/options.h
index 555d9dd..0561c25 100644
--- a/src/openvpn/options.h
+++ b/src/openvpn/options.h
@@ -801,7 +801,7 @@
#define PUF_TYPE_IGNORE 2 /**< filter type to ignore a matching option */
#define PUF_TYPE_REJECT 3 /**< filter type to reject and trigger SIGUSR1 */
int type;
- int size;
+ size_t size;
char *pattern;
struct pull_filter *next;
};
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1440?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings?usp=3Demail
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I02db40d7335df7ab037ae1deb3e20f25a9b199bd
Gerrit-Change-Number: 1440
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: cron2
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
--my7b2XY5ZcY=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
cron2 upl=
oaded patch set #2 to the change originally created by flichtenhel=
d.
View Change
The following approvals got outdated and were remove=
d:
Code-Review+2 by cron2
options: Avoid some conversion warn=
ings
Just use the correct types.
Change-Id: I02db40d7335df7ab=
037ae1deb3e20f25a9b199bd
Signed-off-by: Frank Lichtenheld <frank@...1665...=
641...>
Acked-by: Gert Doering <gert@...1296...>
Gerrit URL:=
https://gerrit.openvpn.net/c/openvpn/+/1440
Message-Id: <20251213084=
225.30988-1-gert@...1296...>
URL: https://www.mail-archive.com/openvp=
n-devel@lists.sourceforge.net/msg35061.html
Signed-off-by: Gert Doering =
<gert@...1296...>
---
M src/openvpn/options.c
M src/openvpn/=
options.h
2 files changed, 2 insertions(+), 11 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes=
/40/1440/2
diff --git a/src/openvpn/options.c b/src/openvpn/options=
.c
index 24c3e92..34af0d3 100644
--- a/src/=
openvpn/options.c
+++ b/src/openvpn/options.c
@@ -1154,13 +1154,8 @@
return get_ipv6_addr(ipv6_pr=
efix_spec, &t_addr, &t_bits, M_WARN);
}
=
-#if defined(__=
GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
static char *
=
-string_substitute(const char *sr=
c, int from, int to, struct gc_arena *gc)
+string_substitute(const char *src, char from, char to=
, struct gc_arena *gc)
{
char *ret =
=3D (char *)gc_malloc(strlen(src) + 1, true, gc);
char=
*dest =3D ret;
@@ -9306,10 +9301,6 @@
=
gc_free(&gc);
}
-#if defined(__GNUC__) || defined(__clang_=
_)
-#pragma GCC diagnos=
tic pop
-#endif<=
br>-
bool=
has_udp_in_local_list(const struct options *options)
<=
span> {
diff --git a/src/openvpn/options.h b/src/openvpn/op=
tions.h
index 555d9dd..0561c25 100644
--- a=
/src/openvpn/options.h
+++ b/src/openvpn/options.h@@ -801,7 +801,7 @@
#define PUF_TYPE_IGNORE 2 /**&=
lt; filter type to ignore a matching option */
#define PUF=
_TYPE_REJECT 3 /**< filter type to reject and trigger SIGUSR1 */<=
br> int type;
- int size;
+ =
size_t size;
char *pattern;
struc=
t pull_filter *next;
};
<=
p>To view, visit change 1440. To unsubscribe, or for help writing mail filters=
, visit settings=
.
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I02db40d7335df7ab037ae1deb3e=
20f25a9b199bd
Gerrit-Change-Number: 1440
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
=
--my7b2XY5ZcY=--