From: "cron2 (Code Review)" Date: Mon, 30 Mar 2026 12:55:17 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <580f0d34bd2c961a40e7a92c2f59e78df4fbbaf3-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="AlfJO/8LE8E="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: wfp_block: Avoid sign-compare warning with Fwpm* return types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --AlfJO/8LE8E= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#11) to the change originally created b= y flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1506?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: wfp_block: Avoid sign-compare warning with Fwpm* return typ= es ...................................................................... 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 Acked-by: Gert Doering 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/msg36= 337.html Signed-off-by: Gert Doering --- 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 =3D add_sublayer(OPENVPN_WFP_BLOCK_SUBLAYER); - if (err =3D=3D FWP_E_ALREADY_EXISTS || err =3D=3D ERROR_SUCCESS) + if (err =3D=3D (DWORD)FWP_E_ALREADY_EXISTS || err =3D=3D ERROR_SUC= CESS) { msg_handler(0, "WFP Block: Added a persistent sublayer with pr= e-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=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I2f6502da1832edcb273a0dfa9b3ef940bec2d711 Gerrit-Change-Number: 1506 Gerrit-PatchSet: 11 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --AlfJO/8LE8E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #11 to the change originally created by flichtenhe= ld.

View Change

The following approvals got outdated and were remov= ed: Code-Review+2 by cron2

wfp_block: Avoid sign-compare warni=
ng 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 e= xpected
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 &l= t;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 ref=
s/changes/06/1506/11
diff --git a/src/openvpn/wfp_block.c b/src/ope=
nvpn/wfp_block.c
index 74d19ce..4d38fdb 100644
--- a/src/openvpn/wfp_block.c
+++ b/src/openvpn/wfp_blo= ck.c
@@ -131,11 +131,6 @@
return err;<= /span>
}

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
= -#pragma GCC diagnostic ignored &= quot;-Wsign-compare"
-#endif
-
= /*
* Block outgoing local traffic, possibly DNS on= ly, except for
* (i) adapter with the specified index (an= d loopback, if all is blocked)
@@ -198,7 +193,7 @@ * do not treat "already exists" as an error */

err =3D add_sublayer(OPENVPN_WFP_BLOCK_SUBLAYER);

- = if (err =3D=3D FWP_E_ALREADY_EXISTS || err =3D=3D ERROR_SUCCESS)+ if (err =3D=3D (DWOR= D)FWP_E_ALREADY_EXISTS || err =3D=3D ERROR_SUCCESS)
= {
msg_handler(0, "WFP Block: Added a pe= rsistent sublayer with pre-defined UUID");
}<= /span>
@@ -345,10 +340,6 @@
return err;
}

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
DWORD
delete_wfp_b= lock_filters(HANDLE engine_handle)
{

To view, visit change 1506. To unsubscribe, or for help writing = mail filters, visit settings.

=
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2f6502da1832edcb273a0dfa9b3= ef940bec2d711
Gerrit-Change-Number: 1506
Gerrit-PatchSet: 11
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --AlfJO/8LE8E=--