In the context of the CMake patchset Lev and I discussed lowering the warning level for the MSVC builds since there are so many conversion warnings they drown out everything else.
So I actually tried what happens when you build with -Wconversion on Linux and whether it would be possible to resolve these issues. The short answer is: no, this is not possible with reasonable effort. But while finding this out I at least fixed some of the issues. So here a small patchset that fell out of that. Can also be reviewed via https://gerrit.openvpn.net/ Frank Lichtenheld (3): Various fixes for -Wconversion errors Change type of frame.mss_fix to uint16_t mss/mtu: make all size calculations use size_t src/openvpn/buffer.c | 4 +- src/openvpn/crypto.c | 10 +++-- src/openvpn/integer.h | 15 ++++++-- src/openvpn/mss.c | 43 +++++++++++----------- src/openvpn/mss.h | 4 +- src/openvpn/mtu.c | 6 +-- src/openvpn/mtu.h | 2 +- src/openvpn/options.c | 1 + src/openvpn/otime.c | 2 +- src/openvpn/otime.h | 2 +- src/openvpn/packet_id.c | 4 +- src/openvpn/reliable.c | 7 ++-- src/openvpn/socket.h | 4 +- src/openvpn/tls_crypt.c | 2 +- src/openvpn/xkey_helper.c | 14 +++---- tests/unit_tests/openvpn/mock_get_random.c | 2 +- tests/unit_tests/openvpn/test_crypto.c | 6 +-- tests/unit_tests/openvpn/test_packet_id.c | 6 +-- tests/unit_tests/openvpn/test_provider.c | 2 +- tests/unit_tests/openvpn/test_tls_crypt.c | 2 +- 20 files changed, 74 insertions(+), 64 deletions(-) -- 2.34.1 _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel