* [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types
[not found] <gerrit.1769789455000.I2f6502da1832edcb273a0dfa9b3ef940bec2d711@...2715...>
@ 2026-01-30 16:11 ` flichtenheld (Code Review)
2026-03-30 11:38 ` cron2 (Code Review)
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: flichtenheld (Code Review) @ 2026-01-30 16:11 UTC (permalink / raw)
To: plaisthos <arne-openvpn@; +Cc: openvpn-devel
[-- Attachment #1: Type: text/plain, Size: 2563 bytes --]
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/+/1506?usp=email
to review the following change.
Change subject: wfp_block: Avoid sign-compare warning with Fwpm* return types
......................................................................
wfp_block: Avoid sign-compare warning with Fwpm* return types
FWP_E_ALREADY_EXISTS is explictly casted to HRESULT which
is LONG. But Fwpm* return DWORD. So if you compare an expected
result with the actual result you get an sign-compare warning...
Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Signed-off-by: Frank Lichtenheld <frank@...2641...>
---
M src/openvpn/wfp_block.c
1 file changed, 1 insertion(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/06/1506/1
diff --git a/src/openvpn/wfp_block.c b/src/openvpn/wfp_block.c
index 74d19ce..4d38fdb 100644
--- a/src/openvpn/wfp_block.c
+++ b/src/openvpn/wfp_block.c
@@ -131,11 +131,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
/*
* Block outgoing local traffic, possibly DNS only, except for
* (i) adapter with the specified index (and loopback, if all is blocked)
@@ -198,7 +193,7 @@
* do not treat "already exists" as an error */
err = add_sublayer(OPENVPN_WFP_BLOCK_SUBLAYER);
- if (err == FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
+ if (err == (DWORD)FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
{
msg_handler(0, "WFP Block: Added a persistent sublayer with pre-defined UUID");
}
@@ -345,10 +340,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
DWORD
delete_wfp_block_filters(HANDLE engine_handle)
{
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1506?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: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Gerrit-Change-Number: 1506
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2641...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...1227...>
[-- Attachment #2: Type: text/html, Size: 4439 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types
[not found] <gerrit.1769789455000.I2f6502da1832edcb273a0dfa9b3ef940bec2d711@...2715...>
2026-01-30 16:11 ` [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types flichtenheld (Code Review)
@ 2026-03-30 11:38 ` cron2 (Code Review)
2026-03-30 11:38 ` [Openvpn-devel] [PATCH v10] " Gert Doering
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cron2 (Code Review) @ 2026-03-30 11:38 UTC (permalink / raw)
To: flichtenheld <frank@; +Cc: plaisthos <arne-openvpn@
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1506?usp=email )
Change subject: wfp_block: Avoid sign-compare warning with Fwpm* return types
......................................................................
Patch Set 10: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1506?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Gerrit-Change-Number: 1506
Gerrit-PatchSet: 10
Gerrit-Owner: flichtenheld <frank@...2641...>
Gerrit-Reviewer: cron2 <gert@...1296...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...1227...>
Gerrit-Attention: flichtenheld <frank@...2641...>
Gerrit-Comment-Date: Mon, 30 Mar 2026 11:38:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
[-- Attachment #2: Type: text/html, Size: 2105 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Openvpn-devel] [PATCH v10] wfp_block: Avoid sign-compare warning with Fwpm* return types
[not found] <gerrit.1769789455000.I2f6502da1832edcb273a0dfa9b3ef940bec2d711@...2715...>
2026-01-30 16:11 ` [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types flichtenheld (Code Review)
2026-03-30 11:38 ` cron2 (Code Review)
@ 2026-03-30 11:38 ` Gert Doering
2026-03-30 12:55 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2026-03-30 12:55 ` [Openvpn-devel] [S] Change in openvpn[master]: " cron2 (Code Review)
2026-03-30 12:55 ` cron2 (Code Review)
4 siblings, 1 reply; 6+ messages in thread
From: Gert Doering @ 2026-03-30 11:38 UTC (permalink / raw)
To: openvpn-devel
From: Frank Lichtenheld <frank@...2641...>
FWP_E_ALREADY_EXISTS is explictly casted to HRESULT which
is LONG. But Fwpm* return DWORD. So if you compare an expected
result with the actual result you get an sign-compare warning...
Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Signed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1506
---
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/+/1506
This mail reflects revision 10 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <gert@...1296...>
diff --git a/src/openvpn/wfp_block.c b/src/openvpn/wfp_block.c
index 74d19ce..4d38fdb 100644
--- a/src/openvpn/wfp_block.c
+++ b/src/openvpn/wfp_block.c
@@ -131,11 +131,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
/*
* Block outgoing local traffic, possibly DNS only, except for
* (i) adapter with the specified index (and loopback, if all is blocked)
@@ -198,7 +193,7 @@
* do not treat "already exists" as an error */
err = add_sublayer(OPENVPN_WFP_BLOCK_SUBLAYER);
- if (err == FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
+ if (err == (DWORD)FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
{
msg_handler(0, "WFP Block: Added a persistent sublayer with pre-defined UUID");
}
@@ -345,10 +340,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
DWORD
delete_wfp_block_filters(HANDLE engine_handle)
{
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Openvpn-devel] [PATCH applied] Re: wfp_block: Avoid sign-compare warning with Fwpm* return types
2026-03-30 11:38 ` [Openvpn-devel] [PATCH v10] " Gert Doering
@ 2026-03-30 12:55 ` Gert Doering
0 siblings, 0 replies; 6+ messages in thread
From: Gert Doering @ 2026-03-30 12:55 UTC (permalink / raw)
To: Frank Lichtenheld <frank@; +Cc: openvpn-devel
A bit of an annoyance, but still an easy one, and one set of #pragmas
gone...
Compile-tested on Ubuntu 24.04 / MinGW.
Your patch has been applied to the master branch.
commit 88325a9a75cc27af225a5ed215ad76fd76e8c9b0
Author: Frank Lichtenheld
Date: Mon Mar 30 13:38:19 2026 +0200
wfp_block: Avoid sign-compare warning with Fwpm* return types
Signed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1506
Message-Id: <20260330113826.20057-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36337.html
Signed-off-by: Gert Doering <gert@...1296...>
--
kind regards,
Gert Doering
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types
[not found] <gerrit.1769789455000.I2f6502da1832edcb273a0dfa9b3ef940bec2d711@...2715...>
` (2 preceding siblings ...)
2026-03-30 11:38 ` [Openvpn-devel] [PATCH v10] " Gert Doering
@ 2026-03-30 12:55 ` cron2 (Code Review)
2026-03-30 12:55 ` cron2 (Code Review)
4 siblings, 0 replies; 6+ messages in thread
From: cron2 (Code Review) @ 2026-03-30 12:55 UTC (permalink / raw)
To: flichtenheld <frank@; +Cc: openvpn-devel
[-- Attachment #1: Type: text/plain, Size: 2852 bytes --]
cron2 has uploaded a new patch set (#11) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1506?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: wfp_block: Avoid sign-compare warning with Fwpm* return types
......................................................................
wfp_block: Avoid sign-compare warning with Fwpm* return types
FWP_E_ALREADY_EXISTS is explictly casted to HRESULT which
is LONG. But Fwpm* return DWORD. So if you compare an expected
result with the actual result you get an sign-compare warning...
Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Signed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1506
Message-Id: <20260330113826.20057-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36337.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn/wfp_block.c
1 file changed, 1 insertion(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/06/1506/11
diff --git a/src/openvpn/wfp_block.c b/src/openvpn/wfp_block.c
index 74d19ce..4d38fdb 100644
--- a/src/openvpn/wfp_block.c
+++ b/src/openvpn/wfp_block.c
@@ -131,11 +131,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
/*
* Block outgoing local traffic, possibly DNS only, except for
* (i) adapter with the specified index (and loopback, if all is blocked)
@@ -198,7 +193,7 @@
* do not treat "already exists" as an error */
err = add_sublayer(OPENVPN_WFP_BLOCK_SUBLAYER);
- if (err == FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
+ if (err == (DWORD)FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
{
msg_handler(0, "WFP Block: Added a persistent sublayer with pre-defined UUID");
}
@@ -345,10 +340,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
DWORD
delete_wfp_block_filters(HANDLE engine_handle)
{
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1506?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Gerrit-Change-Number: 1506
Gerrit-PatchSet: 11
Gerrit-Owner: flichtenheld <frank@...2641...>
Gerrit-Reviewer: cron2 <gert@...1296...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
[-- Attachment #2: Type: text/html, Size: 4781 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types
[not found] <gerrit.1769789455000.I2f6502da1832edcb273a0dfa9b3ef940bec2d711@...2715...>
` (3 preceding siblings ...)
2026-03-30 12:55 ` [Openvpn-devel] [S] Change in openvpn[master]: " cron2 (Code Review)
@ 2026-03-30 12:55 ` cron2 (Code Review)
4 siblings, 0 replies; 6+ messages in thread
From: cron2 (Code Review) @ 2026-03-30 12:55 UTC (permalink / raw)
To: flichtenheld <frank@; +Cc: plaisthos <arne-openvpn@
[-- Attachment #1: Type: text/plain, Size: 2632 bytes --]
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1506?usp=email )
Change subject: wfp_block: Avoid sign-compare warning with Fwpm* return types
......................................................................
wfp_block: Avoid sign-compare warning with Fwpm* return types
FWP_E_ALREADY_EXISTS is explictly casted to HRESULT which
is LONG. But Fwpm* return DWORD. So if you compare an expected
result with the actual result you get an sign-compare warning...
Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Signed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1506
Message-Id: <20260330113826.20057-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36337.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn/wfp_block.c
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/openvpn/wfp_block.c b/src/openvpn/wfp_block.c
index 74d19ce..4d38fdb 100644
--- a/src/openvpn/wfp_block.c
+++ b/src/openvpn/wfp_block.c
@@ -131,11 +131,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
/*
* Block outgoing local traffic, possibly DNS only, except for
* (i) adapter with the specified index (and loopback, if all is blocked)
@@ -198,7 +193,7 @@
* do not treat "already exists" as an error */
err = add_sublayer(OPENVPN_WFP_BLOCK_SUBLAYER);
- if (err == FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
+ if (err == (DWORD)FWP_E_ALREADY_EXISTS || err == ERROR_SUCCESS)
{
msg_handler(0, "WFP Block: Added a persistent sublayer with pre-defined UUID");
}
@@ -345,10 +340,6 @@
return err;
}
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
DWORD
delete_wfp_block_filters(HANDLE engine_handle)
{
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1506?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711
Gerrit-Change-Number: 1506
Gerrit-PatchSet: 11
Gerrit-Owner: flichtenheld <frank@...2641...>
Gerrit-Reviewer: cron2 <gert@...1296...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
[-- Attachment #2: Type: text/html, Size: 4525 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-30 12:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <gerrit.1769789455000.I2f6502da1832edcb273a0dfa9b3ef940bec2d711@...2715...>
2026-01-30 16:11 ` [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types flichtenheld (Code Review)
2026-03-30 11:38 ` cron2 (Code Review)
2026-03-30 11:38 ` [Openvpn-devel] [PATCH v10] " Gert Doering
2026-03-30 12:55 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2026-03-30 12:55 ` [Openvpn-devel] [S] Change in openvpn[master]: " cron2 (Code Review)
2026-03-30 12:55 ` cron2 (Code Review)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.