From d04ff199bb776871e8557812bd4c43a006f3d711 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Thu, 23 Jul 2020 11:54:37 +0200 Subject: [PATCH] Fix unreachable code warning with MSVC fixes #1582 closes #2035 --- CHANGELOG.md | 1 + include/boost/beast/core/impl/buffers_cat.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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) \