mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 14:54:32 +02:00
Suppress incorrect GCC warning:
GCC will something generate an incorrect warning when compiling Beast with the -Wmaybe-uninitialized flag. For more details, see http://www.boost.org/doc/libs/1_64_0/libs/optional/doc/html/boost_optional/tutorial/gotchas/false_positive_with__wmaybe_uninitialized.html
This commit is contained in:
committed by
Vinnie Falco
parent
78f3cd59a1
commit
696c4169fc
@@ -2,6 +2,7 @@ Version 81:
|
||||
|
||||
* Pass string_view by value
|
||||
* better is_final on empty_base_optimization
|
||||
* Suppress incorrect GCC warning
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -1040,7 +1040,10 @@ doWrite(z_params& zs, boost::optional<Flush> flush, error_code& ec)
|
||||
}
|
||||
|
||||
// value of flush param for previous deflate call
|
||||
boost::optional<Flush> old_flush = last_flush_;
|
||||
auto old_flush = boost::make_optional<Flush>(
|
||||
last_flush_.is_initialized(),
|
||||
last_flush_ ? *last_flush_ : Flush::none);
|
||||
|
||||
last_flush_ = flush;
|
||||
|
||||
// Flush as much pending output as possible
|
||||
|
Reference in New Issue
Block a user