From: "cron2 (Code Review)" Date: Fri, 6 Mar 2026 16:20:36 +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="gYFcQaaZXq0="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: route: Fix type of rgi_needed variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --gYFcQaaZXq0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#7) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1505?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: route: Fix type of rgi_needed variables ...................................................................... route: Fix type of rgi_needed variables To avoid unneccesary sign-compare warnings. Change-Id: I2b2a931e13670d753aa9570efe498647ba1a4a7f Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1505 Message-Id: <20260305084914.1327-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 926.html Signed-off-by: Gert Doering --- M src/openvpn/route.c 1 file changed, 2 insertions(+), 20 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/05/1505/7 diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 329f3b0..b196713 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -570,11 +570,6 @@ } } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - static void add_block_local_routes(struct route_list *rl) { @@ -602,15 +597,11 @@ bool block_local_needed(const struct route_list *rl) { - const int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_NETMASK_DEFINED); + const unsigned int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_NETMASK_DEFI= NED); return (rl->flags & RG_BLOCK_LOCAL) && (rl->rgi.flags & rgi_needed) = =3D=3D rgi_needed && (rl->spec.flags & RTSA_REMOTE_ENDPOINT) && rl->spec.remote_h= ost_local !=3D TLA_LOCAL; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - bool init_route_list(struct route_list *rl, const struct route_option_list *opt, const char *remote_endpoint, int default_metric, in_addr_t= remote_host, @@ -1445,17 +1436,12 @@ #define LR_MATCH 1 /* route is local */ #define LR_ERROR 2 /* caller should abort adding route */ -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - static int local_route(in_addr_t network, in_addr_t netmask, in_addr_t gateway, const struct route_gateway_info *rgi) { /* set LR_MATCH on local host routes */ - const int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_NETMASK_DEFINED | RGI= _IFACE_DEFINED); + const unsigned int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_NETMASK_DEFI= NED | RGI_IFACE_DEFINED); if (rgi && (rgi->flags & rgi_needed) =3D=3D rgi_needed && gateway =3D= =3D rgi->gateway.addr && netmask =3D=3D 0xFFFFFFFF) { @@ -1479,10 +1465,6 @@ return LR_NOMATCH; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - /* Return true if the "on-link" form of the route should be used. This is= when the gateway for * a route is specified as an interface rather than an address. */ #if defined(TARGET_LINUX) || defined(_WIN32) || defined(TARGET_DARWIN) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1505?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: I2b2a931e13670d753aa9570efe498647ba1a4a7f Gerrit-Change-Number: 1505 Gerrit-PatchSet: 7 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --gYFcQaaZXq0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #7 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2

route: Fix type of rgi_needed varia=
bles

To avoid unneccesary sign-compare warnings.

Change-Id: I= 2b2a931e13670d753aa9570efe498647ba1a4a7f
Signed-off-by: Frank Lichtenhel= d <frank@...2641...>
Acked-by: Gert Doering <gert@...1296...>= ;
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1505
Message-Id:= <20260305084914.1327-1-gert@...1296...>
URL: https://www.mail-arc= hive.com/openvpn-devel@lists.sourceforge.net/msg35926.html
Signed-off-by= : Gert Doering <gert@...1296...>
---
M src/openvpn/route.c
1= file changed, 2 insertions(+), 20 deletions(-)

=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/05/1505/7
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
= index 329f3b0..b196713 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -570,11 +570,6 @@=
}
}

-#if defined(__GNUC__) || defined(__c= lang__)

-#pragma GCC di= agnostic push
-#pragma = GCC diagnostic ignored "-Wsign-compare"
-#endif
-
static void
add_block_local= _routes(struct route_list *rl)
{
@@ -602,1= 5 +597,11 @@
bool
block_local_needed(cons= t struct route_list *rl)
{
- const int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_= NETMASK_DEFINED);
+ = const unsigned int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_NETMASK_DEFINED= );
return (rl->flags & RG_BLOCK_LOCAL) &&am= p; (rl->rgi.flags & rgi_needed) =3D=3D rgi_needed
= && (rl->spec.flags & RTSA_REMOTE_ENDPOINT) &&a= mp; rl->spec.remote_host_local !=3D TLA_LOCAL;
}=

-#if define= d(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
bool
init_route_list(struct route_list= *rl, const struct route_option_list *opt,
= const char *remote_endpoint, int default_metric, in_addr_t remote_host,

@@ -1445,17 +1436,12 @@
#define LR_MATCH 1= /* route is local */
#define LR_ERROR 2 /* caller shoul= d abort adding route */

-#if defined(__GNUC__) || defined(__clang__)
<= span style=3D"color: hsl(0, 100%, 40%);">-#pragma GCC diagnostic push
-#pragma GCC diagnostic igno= red "-Wsign-compare"
-#endif
-
static int
local_route(in_addr_t network, in_a= ddr_t netmask, in_addr_t gateway,
const struct= route_gateway_info *rgi)
{
/* set LR= _MATCH on local host routes */
- const int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_NETMASK_DEFIN= ED | RGI_IFACE_DEFINED);
+ const unsigned int rgi_needed =3D (RGI_ADDR_DEFINED | RGI_NETMASK_= DEFINED | RGI_IFACE_DEFINED);
if (rgi && (rgi-= >flags & rgi_needed) =3D=3D rgi_needed && gateway =3D=3D rgi= ->gateway.addr
&& netmask =3D=3D 0xFFFF= FFFF)
{
@@ -1479,10 +1465,6 @@<= br> return LR_NOMATCH;
}

-#if defined(__GNUC__) || de= fined(__clang__)
-#prag= ma GCC diagnostic pop
-= #endif
-
/* Return true if the "on-link" form of the route should be us= ed. This is when the gateway for

* a route is specified = as an interface rather than an address. */
#if defined(TAR= GET_LINUX) || defined(_WIN32) || defined(TARGET_DARWIN)

To view, visit change 1505. To unsubscribe, or for help writin= g mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2b2a931e13670d753aa9570efe4= 98647ba1a4a7f
Gerrit-Change-Number: 1505
Gerrit-PatchSet: 7
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>
= --gYFcQaaZXq0=--