cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/865?usp=email )
Change subject: Fix some trivial sign-compare compiler warnings ...................................................................... Fix some trivial sign-compare compiler warnings Change-Id: I1918c43202b87f0c987bfd9155c739da7dd02632 Signed-off-by: Frank Lichtenheld <fr...@lichtenheld.com> Acked-by: Gert Doering <g...@greenie.muc.de> Message-Id: <20250114165206.13187-1-g...@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30455.html Signed-off-by: Gert Doering <g...@greenie.muc.de> --- M src/openvpn/options.c M src/openvpn/socket.c M src/openvpn/tun.c 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index eb0d9b5..3ef4d78 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1448,7 +1448,7 @@ while (server) { - for (int i = 0; i < server->addr_count; ++i) + for (size_t i = 0; i < server->addr_count; ++i) { if (server->addr[i].family == AF_INET) { diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index f9f2a3b..7765372 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -3132,8 +3132,7 @@ int ascii2proto(const char *proto_name) { - int i; - for (i = 0; i < SIZE(proto_names); ++i) + for (size_t i = 0; i < SIZE(proto_names); ++i) { if (!strcmp(proto_name, proto_names[i].short_form)) { @@ -3146,8 +3145,7 @@ sa_family_t ascii2af(const char *proto_name) { - int i; - for (i = 0; i < SIZE(proto_names); ++i) + for (size_t i = 0; i < SIZE(proto_names); ++i) { if (!strcmp(proto_name, proto_names[i].short_form)) { @@ -3160,8 +3158,7 @@ const char * proto2ascii(int proto, sa_family_t af, bool display_form) { - unsigned int i; - for (i = 0; i < SIZE(proto_names); ++i) + for (size_t i = 0; i < SIZE(proto_names); ++i) { if (proto_names[i].proto_af == af && proto_names[i].proto == proto) { @@ -3183,9 +3180,8 @@ proto2ascii_all(struct gc_arena *gc) { struct buffer out = alloc_buf_gc(256, gc); - int i; - for (i = 0; i < SIZE(proto_names); ++i) + for (size_t i = 0; i < SIZE(proto_names); ++i) { if (i) { diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 7fbd6c3..33830fc 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -669,7 +669,7 @@ { struct gc_arena gc = gc_new(); struct route_gateway_info rgi; - const int needed = (RGI_ADDR_DEFINED|RGI_NETMASK_DEFINED); + const unsigned int needed = (RGI_ADDR_DEFINED|RGI_NETMASK_DEFINED); get_default_gateway(&rgi, ctx); if ((rgi.flags & needed) == needed) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/865?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: I1918c43202b87f0c987bfd9155c739da7dd02632 Gerrit-Change-Number: 865 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld <fr...@lichtenheld.com> Gerrit-Reviewer: cron2 <g...@greenie.muc.de> Gerrit-Reviewer: plaisthos <arne-open...@rfc2549.org> Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net> Gerrit-MessageType: merged
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel