From: Frank Lichtenheld <[email protected]> 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]> Acked-by: Gert Doering <[email protected]> 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 <[email protected]> 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) { _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
