Skip to content

Commit

Permalink
Trivial: fix unused-but-set-variable warning
Browse files Browse the repository at this point in the history
(clang 15)
/workspaces/rippled/src/ripple/app/rdb/backend/impl/PostgresDatabase.cpp:178:14: warning: variable 'expNumResults' set but not used [-Wunused-but-set-variable]
    uint32_t expNumResults = 1;
  • Loading branch information
StefanVK committed Aug 27, 2023
1 parent 300b7e0 commit 3c321f5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/ripple/app/rdb/backend/impl/PostgresDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ loadLedgerInfos(
"total_coins, closing_time, prev_closing_time, close_time_res, "
"close_flags, ledger_seq FROM ledgers ";

uint32_t expNumResults = 1;

if (auto ledgerSeq = std::get_if<uint32_t>(&whichLedger))
{
sql << "WHERE ledger_seq = " + std::to_string(*ledgerSeq);
Expand All @@ -189,8 +187,6 @@ loadLedgerInfos(
auto minAndMax =
std::get_if<std::pair<uint32_t, uint32_t>>(&whichLedger))
{
expNumResults = minAndMax->second - minAndMax->first;

sql
<< ("WHERE ledger_seq >= " + std::to_string(minAndMax->first) +
" AND ledger_seq <= " + std::to_string(minAndMax->second));
Expand Down

0 comments on commit 3c321f5

Please sign in to comment.