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:
Nik Bougalis
2017-07-11 16:47:50 -07:00
committed by Vinnie Falco
parent 78f3cd59a1
commit 696c4169fc
2 changed files with 5 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ Version 81:
* Pass string_view by value
* better is_final on empty_base_optimization
* Suppress incorrect GCC warning
--------------------------------------------------------------------------------

View File

@@ -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