Fix unused variable errors (#101)

This commit is contained in:
undertome
2022-02-22 10:07:36 -06:00
committed by GitHub
parent 199144d092
commit cd407d715e

View File

@@ -483,8 +483,8 @@ PostgresBackend::fetchTransactions(
"WHERE HASH = \'\\x"
<< ripple::strHex(hash) << "\'";
auto res = pgQuery(sql.str().data(), yield);
if (size_t numRows = checkResult(res, 4))
if (auto const res = pgQuery(sql.str().data(), yield);
checkResult(res, 4))
{
results[i] = {
res.asUnHexedBlob(0, 0),
@@ -555,9 +555,8 @@ PostgresBackend::doFetchLedgerObjects(
<< " AND ledger_seq <= " << std::to_string(sequence)
<< " ORDER BY ledger_seq DESC LIMIT 1";
auto res = pgQuery(sql.str().data(), yield);
if (size_t numRows = checkResult(res, 1))
if (auto const res = pgQuery(sql.str().data(), yield);
checkResult(res, 1))
results[i] = res.asUnHexedBlob();
if (--numRemaining == 0)