diff --git a/CHANGELOG.md b/CHANGELOG.md index e5d85e4f..28e5c543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,8 @@ Version 358: * Removed moved sections from documentation * Removed superfluous log messages from tests * Fixed portability issues for building tests in MinGW -* Fixed portability issues for building tests in MinGW * Fixed `std::is_trivial` deprecation warnings +* Fixed `-Wmaybe-uninitialized` warnings -------------------------------------------------------------------------------- diff --git a/doc/qbk/release_notes.qbk b/doc/qbk/release_notes.qbk index 89a6d27b..a044290e 100644 --- a/doc/qbk/release_notes.qbk +++ b/doc/qbk/release_notes.qbk @@ -19,6 +19,7 @@ * [issue 2999] Used `handshake_timeout` for closing handshake during read operations * [issue 3003] Added missing `cstdint` header to `detail/cpu_info.hpp` * [issue 3016] Fixed `std::is_trivial` deprecation warnings +* [issue 3019] Fixed `-Wmaybe-uninitialized` warnings [*Improvements] diff --git a/include/boost/beast/websocket/impl/stream_impl.hpp b/include/boost/beast/websocket/impl/stream_impl.hpp index 5113be91..701919dd 100644 --- a/include/boost/beast/websocket/impl/stream_impl.hpp +++ b/include/boost/beast/websocket/impl/stream_impl.hpp @@ -825,8 +825,7 @@ parse_fh( { case 126: { - - std::uint16_t len_be; + std::uint16_t len_be = {}; BOOST_ASSERT(buffer_bytes(cb) >= sizeof(len_be)); cb.consume(net::buffer_copy( net::mutable_buffer(&len_be, sizeof(len_be)), cb)); @@ -841,7 +840,7 @@ parse_fh( } case 127: { - std::uint64_t len_be; + std::uint64_t len_be = {}; BOOST_ASSERT(buffer_bytes(cb) >= sizeof(len_be)); cb.consume(net::buffer_copy( net::mutable_buffer(&len_be, sizeof(len_be)), cb)); @@ -857,7 +856,7 @@ parse_fh( } if(fh.mask) { - std::uint32_t key_le; + std::uint32_t key_le = {}; BOOST_ASSERT(buffer_bytes(cb) >= sizeof(key_le)); cb.consume(net::buffer_copy( net::mutable_buffer(&key_le, sizeof(key_le)), cb));