From: "cron2 (Code Review)" Date: Thu, 9 Oct 2025 14:53:13 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <5080f068cd8698f364b7c67ceb89e24dc04c7bd7-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="uISvmLdjB8k="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: options_util: Fix conversion warning in atoi_constrained List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --uISvmLdjB8k= 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/+/1261?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: options_util: Fix conversion warning in atoi_constrained ...................................................................... options_util: Fix conversion warning in atoi_constrained The whole purpose of the function is to make sure that cast is safe. Change-Id: Id08524661aa5bcc5cd42f27a1aacc636e2b2b004 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1261 Message-Id: <20251008170202.10333-1-gert@...1296...> URL: https://sourceforge.net/p/openvpn/mailman/message/59244107/ Signed-off-by: Gert Doering --- M src/openvpn/options_util.c 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/1261/2 diff --git a/src/openvpn/options_util.c b/src/openvpn/options_util.c index 8a1c083..eba7d39 100644 --- a/src/openvpn/options_util.c +++ b/src/openvpn/options_util.c @@ -162,11 +162,6 @@ return (int)i; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - bool atoi_constrained(const char *str, int *value, const char *name, int min, i= nt max, msglvl_t msglevel) { @@ -194,14 +189,10 @@ return false; } - *value =3D i; + *value =3D (int)i; return true; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - static const char *updatable_options[] =3D { "block-ipv6", "block-outside-= dns", "dhcp-option", "dns", "ifconfig", "ifconfig-ipv6", -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1261?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: Id08524661aa5bcc5cd42f27a1aacc636e2b2b004 Gerrit-Change-Number: 1261 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --uISvmLdjB8k= 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_util: Fix conversion warnin=
g in atoi_constrained

The whole purpose of the function is to make s= ure
that cast is safe.

Change-Id: Id08524661aa5bcc5cd42f27a1aacc6= 36e2b2b004
Signed-off-by: Frank Lichtenheld <frank@...2641...>
= Acked-by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerri= t.openvpn.net/c/openvpn/+/1261
Message-Id: <20251008170202.10333-1-ge= rt@...1296...>
URL: https://sourceforge.net/p/openvpn/mailman/message= /59244107/
Signed-off-by: Gert Doering <gert@...1296...>
---M src/openvpn/options_util.c
1 file changed, 1 insertion(+), 10 deletio= ns(-)

git pull ssh://gerrit.openvpn.net:29418/op=
envpn refs/changes/61/1261/2
diff --git a/src/openvpn/options_util.=
c b/src/openvpn/options_util.c
index 8a1c083..eba7d39 10064= 4
--- a/src/openvpn/options_util.c
+++ b/sr= c/openvpn/options_util.c
@@ -162,11 +162,6 @@
return (int)i;
}

-#if defined(__GNUC__) || defined(__cl= ang__)
-#pragma GCC dia= gnostic push
-#pragma G= CC diagnostic ignored "-Wconversion"
-#endif
-
bool
atoi_constrained(const ch= ar *str, int *value, const char *name, int min, int max, msglvl_t msglevel)=
{
@@ -194,14 +189,10 @@
= return false;
}

- *value =3D i;
+ *value =3D (int)i;
return true;
}

-#if defined(__GNUC__) || defined(__clan= g__)
-#pragma GCC diagn= ostic pop
-#endif

-
static co= nst char *updatable_options[] =3D { "block-ipv6", "block-out= side-dns",
= "dhcp-option", "dns",
= "ifconfig", "ifconfig-ipv6"= ,

To view, visit change 1261. To unsubscrib= e, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id08524661aa5bcc5cd42f27a1aa= cc636e2b2b004
Gerrit-Change-Number: 1261
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>
= --uISvmLdjB8k=--