Skip to content

Commit

Permalink
fix: remove unused variable (XRPLF#4677)
Browse files Browse the repository at this point in the history
With clang 15, an unused-but-set-variable warning was emitted:

PostgresDatabase.cpp:178:14: warning: variable 'expNumResults' set but
not used [-Wunused-but-set-variable]
    uint32_t expNumResults = 1;
  • Loading branch information
StefanVK authored Oct 31, 2023
1 parent 3b624d8 commit 26b0322
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 26b0322

Please sign in to comment.