mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Build options cleanup (#5581)
As we no longer support old compiler versions, we are bringing back some warnings by removing no longer relevant `-Wno-...` options.
This commit is contained in:
@@ -107,8 +107,9 @@ sliceToHex(Slice const& slice)
|
||||
}
|
||||
for (int i = 0; i < slice.size(); ++i)
|
||||
{
|
||||
s += "0123456789ABCDEF"[((slice[i] & 0xf0) >> 4)];
|
||||
s += "0123456789ABCDEF"[((slice[i] & 0x0f) >> 0)];
|
||||
constexpr char hex[] = "0123456789ABCDEF";
|
||||
s += hex[((slice[i] & 0xf0) >> 4)];
|
||||
s += hex[((slice[i] & 0x0f) >> 0)];
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -671,12 +671,12 @@ isMemoOkay(STObject const& st, std::string& reason)
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"abcdefghijklmnopqrstuvwxyz");
|
||||
|
||||
for (char c : symbols)
|
||||
for (unsigned char c : symbols)
|
||||
a[c] = 1;
|
||||
return a;
|
||||
}();
|
||||
|
||||
for (auto c : *optData)
|
||||
for (unsigned char c : *optData)
|
||||
{
|
||||
if (!allowedSymbols[c])
|
||||
{
|
||||
|
||||
@@ -544,7 +544,7 @@ b58_to_b256_be(std::string_view input, std::span<std::uint8_t> out)
|
||||
XRPL_ASSERT(
|
||||
num_b_58_10_coeffs <= b_58_10_coeff.size(),
|
||||
"ripple::b58_fast::detail::b58_to_b256_be : maximum coeff");
|
||||
for (auto c : input.substr(0, partial_coeff_len))
|
||||
for (unsigned char c : input.substr(0, partial_coeff_len))
|
||||
{
|
||||
auto cur_val = ::ripple::alphabetReverse[c];
|
||||
if (cur_val < 0)
|
||||
@@ -558,7 +558,7 @@ b58_to_b256_be(std::string_view input, std::span<std::uint8_t> out)
|
||||
{
|
||||
for (int j = 0; j < num_full_coeffs; ++j)
|
||||
{
|
||||
auto c = input[partial_coeff_len + j * 10 + i];
|
||||
unsigned char c = input[partial_coeff_len + j * 10 + i];
|
||||
auto cur_val = ::ripple::alphabetReverse[c];
|
||||
if (cur_val < 0)
|
||||
{
|
||||
|
||||
@@ -229,7 +229,6 @@ class RCLValidations_test : public beast::unit_test::suite
|
||||
// support for a ledger hash which is already in the trie.
|
||||
|
||||
using Seq = RCLValidatedLedger::Seq;
|
||||
using ID = RCLValidatedLedger::ID;
|
||||
|
||||
// Max known ancestors for each ledger
|
||||
Seq const maxAncestors = 256;
|
||||
|
||||
@@ -703,10 +703,6 @@ aged_associative_container_test_base::checkContentsRefRef(
|
||||
Values const& v)
|
||||
{
|
||||
using Cont = typename std::remove_reference<C>::type;
|
||||
using Traits = TestTraits<
|
||||
Cont::is_unordered::value,
|
||||
Cont::is_multi::value,
|
||||
Cont::is_map::value>;
|
||||
using size_type = typename Cont::size_type;
|
||||
|
||||
BEAST_EXPECT(c.size() == v.size());
|
||||
@@ -761,10 +757,6 @@ typename std::enable_if<!IsUnordered>::type
|
||||
aged_associative_container_test_base::testConstructEmpty()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Comp = typename Traits::Comp;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyComp = typename Traits::MyComp;
|
||||
@@ -802,10 +794,6 @@ typename std::enable_if<IsUnordered>::type
|
||||
aged_associative_container_test_base::testConstructEmpty()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Hash = typename Traits::Hash;
|
||||
using Equal = typename Traits::Equal;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
@@ -870,10 +858,6 @@ typename std::enable_if<!IsUnordered>::type
|
||||
aged_associative_container_test_base::testConstructRange()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Comp = typename Traits::Comp;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyComp = typename Traits::MyComp;
|
||||
@@ -925,10 +909,6 @@ typename std::enable_if<IsUnordered>::type
|
||||
aged_associative_container_test_base::testConstructRange()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Hash = typename Traits::Hash;
|
||||
using Equal = typename Traits::Equal;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
@@ -996,14 +976,6 @@ typename std::enable_if<!IsUnordered>::type
|
||||
aged_associative_container_test_base::testConstructInitList()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Comp = typename Traits::Comp;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyComp = typename Traits::MyComp;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
// testcase (Traits::name() + " init-list");
|
||||
@@ -1020,16 +992,6 @@ typename std::enable_if<IsUnordered>::type
|
||||
aged_associative_container_test_base::testConstructInitList()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Key = typename Traits::Key;
|
||||
using T = typename Traits::T;
|
||||
using Clock = typename Traits::Clock;
|
||||
using Hash = typename Traits::Hash;
|
||||
using Equal = typename Traits::Equal;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
using MyHash = typename Traits::MyHash;
|
||||
using MyEqual = typename Traits::MyEqual;
|
||||
using MyAlloc = typename Traits::MyAlloc;
|
||||
typename Traits::ManualClock clock;
|
||||
|
||||
// testcase (Traits::name() + " init-list");
|
||||
@@ -1050,7 +1012,6 @@ void
|
||||
aged_associative_container_test_base::testCopyMove()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v(Traits::values());
|
||||
@@ -1121,8 +1082,6 @@ void
|
||||
aged_associative_container_test_base::testIterator()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v(Traits::values());
|
||||
|
||||
@@ -1179,8 +1138,6 @@ typename std::enable_if<!IsUnordered>::type
|
||||
aged_associative_container_test_base::testReverseIterator()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
using Alloc = typename Traits::Alloc;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v(Traits::values());
|
||||
|
||||
@@ -1190,7 +1147,6 @@ aged_associative_container_test_base::testReverseIterator()
|
||||
typename Traits::template Cont<> c{clock};
|
||||
|
||||
using iterator = decltype(c.begin());
|
||||
using const_iterator = decltype(c.cbegin());
|
||||
using reverse_iterator = decltype(c.rbegin());
|
||||
using const_reverse_iterator = decltype(c.crbegin());
|
||||
|
||||
@@ -1394,7 +1350,6 @@ void
|
||||
aged_associative_container_test_base::testChronological()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v(Traits::values());
|
||||
|
||||
@@ -1760,7 +1715,6 @@ typename std::enable_if<!IsUnordered>::type
|
||||
aged_associative_container_test_base::testCompare()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
using Value = typename Traits::Value;
|
||||
typename Traits::ManualClock clock;
|
||||
auto const v(Traits::values());
|
||||
|
||||
@@ -1832,8 +1786,6 @@ template <bool IsUnordered, bool IsMulti, bool IsMap>
|
||||
void
|
||||
aged_associative_container_test_base::testMaybeUnorderedMultiMap()
|
||||
{
|
||||
using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
|
||||
|
||||
testConstructEmpty<IsUnordered, IsMulti, IsMap>();
|
||||
testConstructRange<IsUnordered, IsMulti, IsMap>();
|
||||
testConstructInitList<IsUnordered, IsMulti, IsMap>();
|
||||
|
||||
@@ -313,7 +313,6 @@ class LedgerTrie_test : public beast::unit_test::suite
|
||||
testSupport()
|
||||
{
|
||||
using namespace csf;
|
||||
using Seq = Ledger::Seq;
|
||||
|
||||
LedgerTrie<Ledger> t;
|
||||
LedgerHistoryHelper h;
|
||||
@@ -596,7 +595,6 @@ class LedgerTrie_test : public beast::unit_test::suite
|
||||
testRootRelated()
|
||||
{
|
||||
using namespace csf;
|
||||
using Seq = Ledger::Seq;
|
||||
// Since the root is a special node that breaks the no-single child
|
||||
// invariant, do some tests that exercise it.
|
||||
|
||||
|
||||
@@ -805,7 +805,6 @@ class Validations_test : public beast::unit_test::suite
|
||||
Ledger ledgerACD = h["acd"];
|
||||
|
||||
using Seq = Ledger::Seq;
|
||||
using ID = Ledger::ID;
|
||||
|
||||
auto pref = [](Ledger ledger) {
|
||||
return std::make_pair(ledger.seq(), ledger.id());
|
||||
|
||||
@@ -44,7 +44,6 @@ doLogLevel(RPC::JsonContext& context)
|
||||
Logs::toString(Logs::fromSeverity(context.app.logs().threshold()));
|
||||
std::vector<std::pair<std::string, std::string>> logTable(
|
||||
context.app.logs().partition_severities());
|
||||
using stringPair = std::map<std::string, std::string>::value_type;
|
||||
for (auto const& [k, v] : logTable)
|
||||
lev[k] = v;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user