forked from boostorg/beast
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
@@ -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