fix: remove unused variable (#4677)

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;
This commit is contained in:
Stefan van Kessel
2023-10-31 04:35:28 +01:00
committed by GitHub
parent 3b624d8bf8
commit 26b0322aa5

View File

@@ -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);
@@ -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));