From: "cron2 (Code Review)" Date: Thu, 30 Oct 2025 21:01:19 +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="zDoZvM1ei8E="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix warnings about conversion from int to unsigned char/uint8_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --zDoZvM1ei8E= 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= plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/1328?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Fix warnings about conversion from int to unsigned char/uin= t8_t ...................................................................... Fix warnings about conversion from int to unsigned char/uint8_t When compiling with cmake -DCMAKE_BUILD_TYPE=3DASAN under Ubuntu 25.10 (gcc 15.2.0). Explicitly cast these instances to uint8_t/unssigned char to silence this warning. Change-Id: I648ee99b1152b1248d1b3e64af7679ab99f1388f Signed-off-by: Arne Schwabe Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1328 Message-Id: <20251030193834.1186-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 065.html Signed-off-by: Gert Doering --- M src/openvpn/httpdigest.c M src/openvpn/mroute.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/28/1328/2 diff --git a/src/openvpn/httpdigest.c b/src/openvpn/httpdigest.c index be20638..3e6520a 100644 --- a/src/openvpn/httpdigest.c +++ b/src/openvpn/httpdigest.c @@ -46,7 +46,7 @@ } else { - Hex[i * 2] =3D (j + 'a' - 10); + Hex[i * 2] =3D (unsigned char)(j + 'a' - 10); } j =3D Bin[i] & 0xf; if (j <=3D 9) @@ -55,7 +55,7 @@ } else { - Hex[i * 2 + 1] =3D (j + 'a' - 10); + Hex[i * 2 + 1] =3D (unsigned char)(j + 'a' - 10); } } Hex[HASHHEXLEN] =3D '\0'; diff --git a/src/openvpn/mroute.c b/src/openvpn/mroute.c index b50d48f..d17902f 100644 --- a/src/openvpn/mroute.c +++ b/src/openvpn/mroute.c @@ -337,7 +337,7 @@ } else { - ma->v6.addr.s6_addr[byte--] &=3D (0xFF << bits_to_clear); + ma->v6.addr.s6_addr[byte--] &=3D (uint8_t)(0xFF << bits_to= _clear); bits_to_clear =3D 0; } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1328?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: I648ee99b1152b1248d1b3e64af7679ab99f1388f Gerrit-Change-Number: 1328 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel --zDoZvM1ei8E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by plaisthos.<= /p>

Vi= ew Change

The following approvals got outdated and were removed: Code-Review+2 by cron2

Fix warnings about conversion from =
int to unsigned char/uint8_t

When compiling with cmake -DCMAKE_BUILD= _TYPE=3DASAN under Ubuntu 25.10
(gcc 15.2.0).

Explicitly cast the= se instances to uint8_t/unssigned char to silence this
warning.

C= hange-Id: I648ee99b1152b1248d1b3e64af7679ab99f1388f
Signed-off-by: Arne = Schwabe <arne@...1227...>
Acked-by: Gert Doering <gert@...1725...= ..>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1328
Messag= e-Id: <20251030193834.1186-1-gert@...1296...>
URL: https://www.mai= l-archive.com/openvpn-devel@lists.sourceforge.net/msg34065.html
Signed-o= ff-by: Gert Doering <gert@...1296...>
---
M src/openvpn/httpdig= est.c
M src/openvpn/mroute.c
2 files changed, 3 insertions(+), 3 dele= tions(-)

git pull ssh://gerrit.openvpn.net:29418=
/openvpn refs/changes/28/1328/2
diff --git a/src/openvpn/httpdigest=
.c b/src/openvpn/httpdigest.c
index be20638..3e6520a 100644=
--- a/src/openvpn/httpdigest.c
+++ b/src/o= penvpn/httpdigest.c
@@ -46,7 +46,7 @@
= }
else
{
- Hex[i * 2] =3D (j + &#= 39;a' - 10);
+ = Hex[i * 2] =3D (unsigned char)(j + 'a' - 10);
}
j =3D Bin[i] & 0xf;
<= span> if (j <=3D 9)
@@ -55,7 +55,7 @@
= }
else
{
- Hex[i * 2 += 1] =3D (j + 'a' - 10);
+ Hex[i * 2 + 1] =3D (unsigned char)(j + 'a' = - 10);
}
}
= Hex[HASHHEXLEN] =3D '\0';
diff --git a/src/openv= pn/mroute.c b/src/openvpn/mroute.c
index b50d48f..d17902f 1= 00644
--- a/src/openvpn/mroute.c
+++ b/src/= openvpn/mroute.c
@@ -337,7 +337,7 @@
= }
else
{
- ma->= v6.addr.s6_addr[byte--] &=3D (0xFF << bits_to_clear);
<= span style=3D"color: hsl(120, 100%, 40%);">+ ma->v6.addr.= s6_addr[byte--] &=3D (uint8_t)(0xFF << bits_to_clear);

= bits_to_clear =3D 0;
}<= /span>
}

To view, vis= it chang= e 1328. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I648ee99b1152b1248d1b3e64af7= 679ab99f1388f
Gerrit-Change-Number: 1328
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --zDoZvM1ei8E=--