diff --git a/CHANGELOG.md b/CHANGELOG.md index f30f4ec0..bb67b566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ Version XXX: +* Fix unreachable code warning with MSVC. * Fix logic error in advance_server_flex. * Fix file open with append_existing flag on posix. * Websocket SSL `teardown` also tears down underlying TCP. diff --git a/include/boost/beast/core/impl/buffers_cat.hpp b/include/boost/beast/core/impl/buffers_cat.hpp index a0506a0b..feb41ba4 100644 --- a/include/boost/beast/core/impl/buffers_cat.hpp +++ b/include/boost/beast/core/impl/buffers_cat.hpp @@ -52,7 +52,7 @@ public: #if defined(_MSC_VER) && ! defined(__clang__) # define BOOST_BEAST_UNREACHABLE() __assume(false) -# define BOOST_BEAST_UNREACHABLE_RETURN(v) __assume(false) +# define BOOST_BEAST_UNREACHABLE_RETURN(v) return v #else # define BOOST_BEAST_UNREACHABLE() __builtin_unreachable() # define BOOST_BEAST_UNREACHABLE_RETURN(v) \