Add compiler flags (#850)

Fixes #435
This commit is contained in:
Sergey Kuznetsov
2023-10-02 16:45:48 +01:00
committed by GitHub
parent d1c41a8bb7
commit 69f5025a29
53 changed files with 383 additions and 382 deletions

View File

@@ -31,7 +31,7 @@ struct MockSession : public web::ConnectionBase
}
void
send(std::string&& msg, boost::beast::http::status status = boost::beast::http::status::ok) override
send(std::string&& msg, boost::beast::http::status = boost::beast::http::status::ok) override
{
message += msg;
}
@@ -43,15 +43,14 @@ struct MockSession : public web::ConnectionBase
struct MockDeadSession : public web::ConnectionBase
{
void
send(std::shared_ptr<std::string> _) override
void send(std::shared_ptr<std::string>) override
{
// err happen, the session should remove from subscribers
ec_.assign(2, boost::system::system_category());
}
void
send(std::string&& _, boost::beast::http::status __ = boost::beast::http::status::ok) override
send(std::string&&, boost::beast::http::status = boost::beast::http::status::ok) override
{
}

View File

@@ -37,7 +37,7 @@ ripple::uint256
binaryStringToUint256(std::string const& bin)
{
ripple::uint256 uint;
return uint.fromVoid((void const*)bin.data());
return uint.fromVoid(static_cast<void const*>(bin.data()));
}
std::string

View File

@@ -22,6 +22,7 @@
#include <boost/asio.hpp>
#include <boost/beast.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/ssl.hpp>
#include <string>
@@ -57,7 +58,7 @@ struct HttpSyncClient
boost::beast::error_code ec;
stream.socket().shutdown(tcp::socket::shutdown_both, ec);
return std::string(res.body());
return res.body();
}
};
@@ -107,7 +108,7 @@ public:
struct HttpsSyncClient
{
static bool
verify_certificate(bool preverified, boost::asio::ssl::verify_context& ctx)
verify_certificate(bool /* preverified */, boost::asio::ssl::verify_context& /* ctx */)
{
return true;
}
@@ -123,7 +124,11 @@ struct HttpsSyncClient
tcp::resolver resolver(ioc);
boost::beast::ssl_stream<boost::beast::tcp_stream> stream(ioc, ctx);
// We can't fix this so have to ignore
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
if (!SSL_set_tlsext_host_name(stream.native_handle(), host.c_str()))
#pragma GCC diagnostic pop
{
boost::beast::error_code ec{static_cast<int>(::ERR_get_error()), net::error::get_ssl_category()};
throw boost::beast::system_error{ec};
@@ -147,7 +152,7 @@ struct HttpsSyncClient
boost::beast::error_code ec;
stream.shutdown(ec);
return std::string(res.body());
return res.body();
}
};

View File

@@ -334,7 +334,6 @@ CreatePaymentChannelLedgerObject(
[[nodiscard]] ripple::STObject
CreateRippleStateLedgerObject(
std::string_view accountId,
std::string_view currency,
std::string_view issuerId,
int balance,

View File

@@ -172,7 +172,6 @@ CreatePaymentChannelLedgerObject(
[[nodiscard]] ripple::STObject
CreateRippleStateLedgerObject(
std::string_view accountId,
std::string_view currency,
std::string_view issuerId,
int balance,