Change in openvpn[master]: Fix some trivial sign-compare compiler warnings
A message that is not in the archive (sent off-list or not yet received): gerrit.1736860439000.I1918c43202b87f0c987bfd9155c739da7dd02632@...2715...
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/+/865?usp=email
to review the following change.
Change subject: Fix some trivial sign-compare compiler warnings
......................................................................
Fix some trivial sign-compare compiler warnings
---
M src/openvpn/options.c
M src/openvpn/socket.c
M src/openvpn/tun.c
3 files changed, 6 insertions(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/865/1
src/openvpn/options.c +1 -1
@@ -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 ) {
src/openvpn/socket.c +4 -8
@@ -3131,8 +3131,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)) {
@@ -3145,8 +3144,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)) {
@@ -3159,8 +3157,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) {
@@ -3182,9 +3179,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) {
src/openvpn/tun.c +1 -1
@@ -631,7 +631,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: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/865?usp=email )
Change subject: Fix some trivial sign-compare compiler warnings
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
looks good, +2 unless one of the "non smoketest" builders fails later on
--
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: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Tue, 14 Jan 2025 16:51:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v2 1/1 Fix some trivial sign-compare compiler warnings
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/865
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/options.c +1 -1
@@ -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 ) {
src/openvpn/socket.c +4 -8
@@ -3131,8 +3131,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)) {
@@ -3145,8 +3144,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)) {
@@ -3159,8 +3157,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) {
@@ -3182,9 +3179,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) {
src/openvpn/tun.c +1 -1
@@ -631,7 +631,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)
[Openvpn-devel] [PATCH applied] Re: Fix some trivial sign-compare compiler warnings
Stared at the changes (make sense), BB confirms that no platform takes offense either, so in it goes.
Your patch has been applied to the master branch.
commit 6d91eda5a120a4a18273d82fed6777b3efcce8cc
Author: Frank Lichtenheld Date: Tue Jan 14 17:52:06 2025 +0100
Fix some trivial sign-compare compiler warnings
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30455.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#4) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/865?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: Fix some trivial sign-compare compiler warnings
......................................................................
Fix some trivial sign-compare compiler warnings
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30455.html
---
M src/openvpn/options.c
M src/openvpn/socket.c
M src/openvpn/tun.c
3 files changed, 6 insertions(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/865/4
src/openvpn/options.c +1 -1
@@ -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 ) {
src/openvpn/socket.c +4 -8
@@ -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) {
src/openvpn/tun.c +1 -1
@@ -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 <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
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
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30455.html
---
M src/openvpn/options.c
M src/openvpn/socket.c
M src/openvpn/tun.c
3 files changed, 6 insertions(+), 10 deletions(-)
src/openvpn/options.c +1 -1
@@ -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 ) {
src/openvpn/socket.c +4 -8
@@ -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) {
src/openvpn/tun.c +1 -1
@@ -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 <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged