@@ -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)