From: "cron2 (Code Review)" Date: Sun, 31 Aug 2025 16:50:43 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="gc1CxKhMFTM="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: socket_util: Clean up conversion warnings in add_in6_addr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --gc1CxKhMFTM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#5) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1161?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: socket_util: Clean up conversion warnings in add_in6_addr ...................................................................... socket_util: Clean up conversion warnings in add_in6_addr Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <20250831151259.25788-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 725.html Signed-off-by: Gert Doering --- M src/openvpn/socket_util.c 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/1161/5 diff --git a/src/openvpn/socket_util.c b/src/openvpn/socket_util.c index 13f8c32..9b7312d 100644 --- a/src/openvpn/socket_util.c +++ b/src/openvpn/socket_util.c @@ -241,14 +241,12 @@ struct in6_addr add_in6_addr(struct in6_addr base, uint32_t add) { - int i; - - for (i =3D 15; i >=3D 0 && add > 0; i--) + for (int i =3D 15; i >=3D 0 && add > 0; i--) { - register int carry; + register uint32_t carry; register uint32_t h; - h =3D (unsigned char)base.s6_addr[i]; + h =3D base.s6_addr[i]; base.s6_addr[i] =3D (h + add) & UINT8_MAX; /* using explicit carry for the 8-bit additions will catch -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1161?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74 Gerrit-Change-Number: 1161 Gerrit-PatchSet: 5 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --gc1CxKhMFTM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #5 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outd= ated and were removed: Code-Review+2 by cron2

socket_util: Clean up conversion warnings in add_in6=
_addr

Change-Id: Id3b8719ee6b457ce2d85156b39e0cea771a97e74
Signed= -off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doeri= ng <gert@...1296...>
Message-Id: <20250831151259.25788-1-gert@...220...= ..1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1439...= ceforge.net/msg32725.html
Signed-off-by: Gert Doering <gert@...2132...= .>
---
M src/openvpn/socket_util.c
1 file changed, 3 insertions= (+), 5 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openv=
pn refs/changes/61/1161/5
diff --git a/src/openvpn/socket_util.c b/=
src/openvpn/socket_util.c
index 13f8c32..9b7312d 100644
--- a/src/openvpn/socket_util.c
+++ b/src/open= vpn/socket_util.c
@@ -241,14 +241,12 @@
st= ruct in6_addr
add_in6_addr(struct in6_addr base, uint32_t = add)
{
- int i;
-- for (i =3D 15; i >=3D 0= && add > 0; i--)
+ for (int i =3D 15; i >=3D 0 && add > 0; i--)
{
- = register int carry;
+ register uint32_t carry;
register ui= nt32_t h;

- h =3D (unsigned char)base.s6_addr[i];
+ h =3D base.s6_addr[i];
= base.s6_addr[i] =3D (h + add) & UINT8_MAX;

/* using explicit carry for the 8-bit additio= ns will catch

To view, visit change 1161. T= o unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id3b8719ee6b457ce2d85156b39e= 0cea771a97e74
Gerrit-Change-Number: 1161
Gerrit-PatchSet: 5
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>
Gerrit-MessageType: newpatchset
--gc1CxKhMFTM=--