mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-25 08:00:22 +00:00
chore: Enable clang-tidy bugprone-unused-local-non-trivial-variable check (#6458)
This commit is contained in:
@@ -60,6 +60,7 @@ Checks: "-*,
|
||||
bugprone-unhandled-exception-at-new,
|
||||
bugprone-unique-ptr-array-mismatch,
|
||||
bugprone-unsafe-functions,
|
||||
bugprone-unused-local-non-trivial-variable,
|
||||
bugprone-virtual-near-miss,
|
||||
cppcoreguidelines-no-suspend-with-lock,
|
||||
cppcoreguidelines-virtual-class-destructor,
|
||||
@@ -85,13 +86,12 @@ Checks: "-*,
|
||||
performance-trivially-destructible
|
||||
"
|
||||
# ---
|
||||
# more checks that have some issues that need to be resolved:
|
||||
# checks that have some issues that need to be resolved:
|
||||
#
|
||||
# bugprone-crtp-constructor-accessibility,
|
||||
# bugprone-inc-dec-in-conditions,
|
||||
# bugprone-reserved-identifier,
|
||||
# bugprone-move-forwarding-reference,
|
||||
# bugprone-unused-local-non-trivial-variable,
|
||||
# bugprone-switch-missing-default-case,
|
||||
# bugprone-suspicious-stringview-data-usage,
|
||||
# bugprone-suspicious-missing-comma,
|
||||
|
||||
@@ -248,7 +248,6 @@ public:
|
||||
// save should store all trusted master keys to db
|
||||
std::vector<std::string> s1;
|
||||
std::vector<std::string> keys;
|
||||
std::string cfgManifest;
|
||||
for (auto const& man : inManifests)
|
||||
s1.push_back(toBase58(TokenType::NodePublic, man->masterKey));
|
||||
unl->load({}, s1, keys);
|
||||
|
||||
@@ -2583,13 +2583,10 @@ class LedgerEntry_test : public beast::unit_test::suite
|
||||
env(check::create(env.master, alice, XRP(100)));
|
||||
env.close();
|
||||
|
||||
std::string const ledgerHash{to_string(env.closed()->header().hash)};
|
||||
{
|
||||
// Request a check.
|
||||
Json::Value const jrr = env.rpc("ledger_entry", to_string(checkId.key))[jss::result];
|
||||
BEAST_EXPECT(jrr[jss::node][sfLedgerEntryType.jsonName] == jss::Check);
|
||||
BEAST_EXPECT(jrr[jss::node][sfSendMax.jsonName] == "100000000");
|
||||
}
|
||||
// Request a check.
|
||||
Json::Value const jrr = env.rpc("ledger_entry", to_string(checkId.key))[jss::result];
|
||||
BEAST_EXPECT(jrr[jss::node][sfLedgerEntryType.jsonName] == jss::Check);
|
||||
BEAST_EXPECT(jrr[jss::node][sfSendMax.jsonName] == "100000000");
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -2753,7 +2750,6 @@ class LedgerEntry_XChain_test : public beast::unit_test::suite,
|
||||
scEnv(xchain_create_claim_id(scBob, jvb, reward, mcBob));
|
||||
scEnv.close();
|
||||
|
||||
std::string bridge_index;
|
||||
{
|
||||
// request the xchain_claim_id via RPC
|
||||
Json::Value jvParams;
|
||||
|
||||
@@ -53,8 +53,8 @@ class Peers_test : public beast::unit_test::suite
|
||||
continue;
|
||||
if (!BEAST_EXPECT((*it).isMember(jss::tag)))
|
||||
continue;
|
||||
auto tag = (*it)[jss::tag].asString();
|
||||
BEAST_EXPECTS((*it)[jss::tag].asString() == nodes[key], key);
|
||||
auto const tag = (*it)[jss::tag].asString();
|
||||
BEAST_EXPECTS(tag == nodes[key], key);
|
||||
}
|
||||
BEAST_EXPECT(peers.isMember(jss::peers) && peers[jss::peers].isNull());
|
||||
}
|
||||
|
||||
@@ -78,8 +78,6 @@ RCLConsensus::Adaptor::Adaptor(
|
||||
|
||||
if (validatorKeys_.nodeID != beast::zero && validatorKeys_.keys)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
JLOG(j_.info()) << "Validator identity: "
|
||||
<< toBase58(TokenType::NodePublic, validatorKeys_.keys->masterPublicKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user