Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1505?usp=email
to review the following change.
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 <[email protected]>
---
M src/openvpn/route.c
1 file changed, 2 insertions(+), 20 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/05/1505/1
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 = (RGI_ADDR_DEFINED | RGI_NETMASK_DEFINED);
+ const unsigned int rgi_needed = (RGI_ADDR_DEFINED | RGI_NETMASK_DEFINED);
return (rl->flags & RG_BLOCK_LOCAL) && (rl->rgi.flags & rgi_needed) ==
rgi_needed
&& (rl->spec.flags & RTSA_REMOTE_ENDPOINT) &&
rl->spec.remote_host_local != 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 = (RGI_ADDR_DEFINED | RGI_NETMASK_DEFINED |
RGI_IFACE_DEFINED);
+ const unsigned int rgi_needed = (RGI_ADDR_DEFINED | RGI_NETMASK_DEFINED |
RGI_IFACE_DEFINED);
if (rgi && (rgi->flags & rgi_needed) == rgi_needed && gateway ==
rgi->gateway.addr
&& netmask == 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=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2b2a931e13670d753aa9570efe498647ba1a4a7f
Gerrit-Change-Number: 1505
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel