diff --git a/examples/file_body.hpp b/examples/file_body.hpp index 300444ac..6df8dc86 100644 --- a/examples/file_body.hpp +++ b/examples/file_body.hpp @@ -23,7 +23,7 @@ struct file_body class writer { - std::uint64_t size_; + std::uint64_t size_ = 0; std::uint64_t offset_ = 0; std::string const& path_; FILE* file_ = nullptr; diff --git a/include/beast/websocket/detail/frame.hpp b/include/beast/websocket/detail/frame.hpp index 0de62d77..7ce5cb77 100644 --- a/include/beast/websocket/detail/frame.hpp +++ b/include/beast/websocket/detail/frame.hpp @@ -110,7 +110,7 @@ is_valid(close_code::value code) if(v >= 1016 && v <= 2999) return false; // not used - if(v >= 0 && v <= 999) + if(v <= 999) return false; return true; } diff --git a/include/beast/websocket/teardown.hpp b/include/beast/websocket/teardown.hpp index 95a54f5e..d3ffd2c8 100644 --- a/include/beast/websocket/teardown.hpp +++ b/include/beast/websocket/teardown.hpp @@ -51,7 +51,7 @@ teardown(teardown_tag, Socket& socket, error_code& ec) */ static_assert(sizeof(Socket)==-1, "Unknown Socket type in teardown."); -}; +} /** Start tearing down a connection.