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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel