mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 05:17:26 +02:00
Silence gcc-8 warning:
The warning was caused by a false positive triggered by boost::optional. Reference: https://github.com/boostorg/optional/issues/72 Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
@ -3,6 +3,7 @@ Version 254:
|
|||||||
* Fix data race in test::stream::connect
|
* Fix data race in test::stream::connect
|
||||||
* Fix UB in websocket close tests
|
* Fix UB in websocket close tests
|
||||||
* Fix uninitalized memory use in deflate_stream
|
* Fix uninitalized memory use in deflate_stream
|
||||||
|
* Fix gcc-8 warning in websocket::stream
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -664,21 +664,22 @@ public:
|
|||||||
auto& impl = *sp;
|
auto& impl = *sp;
|
||||||
using mutable_buffers_type = typename
|
using mutable_buffers_type = typename
|
||||||
DynamicBuffer::mutable_buffers_type;
|
DynamicBuffer::mutable_buffers_type;
|
||||||
boost::optional<mutable_buffers_type> mb;
|
|
||||||
BOOST_ASIO_CORO_REENTER(*this)
|
BOOST_ASIO_CORO_REENTER(*this)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
mb = beast::detail::dynamic_buffer_prepare(b_,
|
|
||||||
clamp(impl.read_size_hint_db(b_), limit_),
|
|
||||||
ec, error::buffer_overflow);
|
|
||||||
if(impl.check_stop_now(ec))
|
|
||||||
goto upcall;
|
|
||||||
|
|
||||||
// VFALCO TODO use boost::beast::bind_continuation
|
// VFALCO TODO use boost::beast::bind_continuation
|
||||||
BOOST_ASIO_CORO_YIELD
|
BOOST_ASIO_CORO_YIELD
|
||||||
read_some_op<read_op, mutable_buffers_type>(
|
{
|
||||||
std::move(*this), sp, *mb);
|
auto mb = beast::detail::dynamic_buffer_prepare(b_,
|
||||||
|
clamp(impl.read_size_hint_db(b_), limit_),
|
||||||
|
ec, error::buffer_overflow);
|
||||||
|
if(impl.check_stop_now(ec))
|
||||||
|
goto upcall;
|
||||||
|
read_some_op<read_op, mutable_buffers_type>(
|
||||||
|
std::move(*this), sp, *mb);
|
||||||
|
}
|
||||||
|
|
||||||
b_.commit(bytes_transferred);
|
b_.commit(bytes_transferred);
|
||||||
bytes_written_ += bytes_transferred;
|
bytes_written_ += bytes_transferred;
|
||||||
if(ec)
|
if(ec)
|
||||||
|
Reference in New Issue
Block a user