fix: Silence -Wunused-variable on LoanPay asset asserts

Mark the raw pre-rounding projections `assetsAvailableAfterRaw` and
`assetsTotalAfterRaw` in LoanPay::doApply as [[maybe_unused]]: they are
only referenced from XRPL_ASSERT_PARTS, which is compiled out in Release
(NDEBUG) builds, so clang's -Werror,-Wunused-variable was breaking the
ubuntu-clang-release-amd64 and macos-arm64-release CI jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Vito
2026-08-10 14:34:08 +02:00
parent d6565f0e4d
commit 00889a4307

View File

@@ -517,8 +517,9 @@ LoanPay::doApply()
// check; the real post-rounding values are read back from the Vault SLE
// further below, once addVaultAssets/associateAsset have actually
// mutated and rounded it.
Number const assetsAvailableAfterRaw = assetsAvailableBefore + totalPaidToVaultRounded;
Number const assetsTotalAfterRaw = assetsTotalBefore + assetsTotalDelta;
[[maybe_unused]] Number const assetsAvailableAfterRaw =
assetsAvailableBefore + totalPaidToVaultRounded;
[[maybe_unused]] Number const assetsTotalAfterRaw = assetsTotalBefore + assetsTotalDelta;
XRPL_ASSERT_PARTS(
assetsAvailableAfterRaw <= assetsTotalAfterRaw,