diff --git a/CHANGELOG.md b/CHANGELOG.md index 55a4f753..36ce0255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 61: * Remove Spirit dependency * Use generic_cateogry for errno * Reorganize SSL examples +* Tidy up some integer conversion warnings -------------------------------------------------------------------------------- diff --git a/example/server-framework/file_body.hpp b/example/server-framework/file_body.hpp index 345a1fa2..96bf80fa 100644 --- a/example/server-framework/file_body.hpp +++ b/example/server-framework/file_body.hpp @@ -204,7 +204,8 @@ get(beast::error_code& ec) -> { // Calculate the smaller of our buffer size, // or the amount of unread data in the file. - auto const amount = std::min(remain_, sizeof(buf_)); + auto const amount = remain_ > sizeof(buf_) ? + sizeof(buf_) : static_cast(remain_); // Check for an empty file if(amount == 0) diff --git a/test/core/buffer_bench.cpp b/test/core/buffer_bench.cpp index a18fae4f..cf02edfe 100644 --- a/test/core/buffer_bench.cpp +++ b/test/core/buffer_bench.cpp @@ -51,7 +51,7 @@ public: inline size_type throughput(std::chrono::duration< - double> const& elapsed, std::size_t items) + double> const& elapsed, size_type items) { using namespace std::chrono; return static_cast( diff --git a/test/websocket/websocket_sync_echo_server.hpp b/test/websocket/websocket_sync_echo_server.hpp index e20dd41c..ab4384e9 100644 --- a/test/websocket/websocket_sync_echo_server.hpp +++ b/test/websocket/websocket_sync_echo_server.hpp @@ -209,7 +209,7 @@ private: void fail(std::string what, error_code ec, - int id, endpoint_type const& ep) + std::size_t id, endpoint_type const& ep) { if(log_) if(ec != beast::websocket::error::closed)