From: flichtenheld (C. Review) <ge...@op...> - 2025-07-24 12:32:00
|
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/+/1109?usp=email to review the following change. Change subject: route: Make sure various route flags are treated as unsigned ...................................................................... route: Make sure various route flags are treated as unsigned The variables that hold them are already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: Ib7f78abbcd52c00a32afdea36ef635681ac8e127 Signed-off-by: Frank Lichtenheld <fr...@li...> --- M src/openvpn/route.h 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/09/1109/1 diff --git a/src/openvpn/route.h b/src/openvpn/route.h index 237375c..f015a12 100644 --- a/src/openvpn/route.h +++ b/src/openvpn/route.h @@ -83,14 +83,14 @@ }; /* redirect-gateway flags */ -#define RG_ENABLE (1<<0) -#define RG_LOCAL (1<<1) -#define RG_DEF1 (1<<2) -#define RG_BYPASS_DHCP (1<<3) -#define RG_BYPASS_DNS (1<<4) -#define RG_REROUTE_GW (1<<5) -#define RG_AUTO_LOCAL (1<<6) -#define RG_BLOCK_LOCAL (1<<7) +#define RG_ENABLE (1u<<0) +#define RG_LOCAL (1u<<1) +#define RG_DEF1 (1u<<2) +#define RG_BYPASS_DHCP (1u<<3) +#define RG_BYPASS_DNS (1u<<4) +#define RG_REROUTE_GW (1u<<5) +#define RG_AUTO_LOCAL (1u<<6) +#define RG_BLOCK_LOCAL (1u<<7) struct route_option_list { unsigned int flags; /* RG_x flags */ @@ -113,9 +113,9 @@ }; struct route_ipv4 { -#define RT_DEFINED (1<<0) -#define RT_ADDED (1<<1) -#define RT_METRIC_DEFINED (1<<2) +#define RT_DEFINED (1u<<0) +#define RT_ADDED (1u<<1) +#define RT_METRIC_DEFINED (1u<<2) struct route_ipv4 *next; unsigned int flags; const struct route_option *option; @@ -216,9 +216,9 @@ }; struct route_list { -#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1<<0) -#define RL_DID_LOCAL (1<<1) -#define RL_ROUTES_ADDED (1<<2) +#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1u<<0) +#define RL_DID_LOCAL (1u<<1) +#define RL_ROUTES_ADDED (1u<<2) unsigned int iflags; struct route_special_addr spec; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1109?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ib7f78abbcd52c00a32afdea36ef635681ac8e127 Gerrit-Change-Number: 1109 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-MessageType: newchange |