Tidying and fix warnings

This commit is contained in:
seelabs
2016-05-10 21:21:19 -04:00
committed by Vinnie Falco
parent bbfe44cc10
commit da78f3cec4
13 changed files with 33 additions and 38 deletions

View File

@@ -20,7 +20,7 @@ else()
find_package(Threads)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -g -std=c++11 -Wall -Wextra -Wpedantic -Wconversion -Wno-unused-variable")
"${CMAKE_CXX_FLAGS} -g -std=c++11 -Wall -Wpedantic")
endif()
message ("cxx Flags: " ${CMAKE_CXX_FLAGS})

View File

@@ -35,7 +35,7 @@ private:
std::thread thread_;
std::mutex m_;
std::condition_variable cv_;
bool running_ = false;;
bool running_ = false;
public:
/// The type of yield context passed to functions.

View File

@@ -543,7 +543,7 @@ suite::run (runner& r)
#define BEAST_DEFINE_TESTSUITE_INSERT(Class,Module,Library,manual) \
static beast::unit_test::detail::insert_suite <Class##_test> \
Library ## Module ## Class ## _test_instance ( \
#Class, #Module, #Library, manual);
#Class, #Module, #Library, manual)
//------------------------------------------------------------------------------

View File

@@ -146,7 +146,7 @@ unhex(char c)
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // 112
}};
return tab[static_cast<std::uint8_t>(c)];
};
}
template<class = void>
struct parser_str_t

View File

@@ -478,10 +478,9 @@ write(SyncWriteStream& stream,
cv.notify_one();
}};
auto copy = resume;
boost::tribool result;
result = wp.w(std::move(copy), ec,
detail::writef0_lambda<SyncWriteStream, decltype(wp.sb)>{
stream, wp.sb, wp.chunked, ec});
boost::tribool result = wp.w(std::move(copy),
ec, detail::writef0_lambda<SyncWriteStream,
decltype(wp.sb)>{stream, wp.sb, wp.chunked, ec});
if(ec)
return;
if(boost::indeterminate(result))

View File

@@ -93,7 +93,6 @@ struct message
@param v An argument forwarded to the headers constructor.
*/
template<class U, class V>
explicit
message(U&& u, V&& v)
: headers(std::forward<V>(v))
, body(std::forward<U>(u))
@@ -118,7 +117,6 @@ struct message
@param vn A tuple forwarded as a parameter pack to the headers constructor.
*/
template<class... Un, class... Vn>
explicit
message(std::piecewise_construct_t,
std::tuple<Un...>&& un, std::tuple<Vn...>&& vn)
: message(std::piecewise_construct, un, vn,

View File

@@ -48,9 +48,9 @@ little_uint32_to_native(void const* buf)
std::uint8_t const*>(buf);
return
p[0] +
(static_cast<std::uint64_t>(p[1])<< 8) +
(static_cast<std::uint64_t>(p[2])<<16) +
(static_cast<std::uint64_t>(p[3])<<24);
(static_cast<std::uint32_t>(p[1])<< 8) +
(static_cast<std::uint32_t>(p[2])<<16) +
(static_cast<std::uint32_t>(p[3])<<24);
}
inline

View File

@@ -533,9 +533,8 @@ public:
{
using boost::asio::buffer;
std::string s;
std::size_t n;
for(n = 0;; ++n)
for(std::size_t n = 0;; ++n)
{
// Create a request and set one octet to an invalid char
s =
@@ -572,7 +571,7 @@ public:
}
}
for(n = 0;; ++n)
for(std::size_t n = 0;; ++n)
{
// Create a response and set one octet to an invalid char
s =

View File

@@ -481,7 +481,6 @@ public:
{
stream<socket_type> ws;
explicit
con(endpoint_type const& ep, boost::asio::io_service& ios)
: ws(ios)
{