From 9cb23bf2b344967d3de5217b73e9525782a34baf Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 14 Feb 2024 10:18:04 -0800 Subject: [PATCH] [NFC] Avoid a warning on an unused var (#6300) --- src/passes/RemoveUnusedBrs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/passes/RemoveUnusedBrs.cpp b/src/passes/RemoveUnusedBrs.cpp index 576f2fe9129..893cf9039bc 100644 --- a/src/passes/RemoveUnusedBrs.cpp +++ b/src/passes/RemoveUnusedBrs.cpp @@ -1566,7 +1566,8 @@ struct RemoveUnusedBrs : public WalkerPass> { auto* condition = getProperBrIf(curr)->condition; if (auto* binary = condition->dynCast()) { return binary->right->cast()->value.geti32(); - } else if (auto* unary = condition->dynCast()) { + } else if ([[maybe_unused]] auto* unary = + condition->dynCast()) { assert(unary->op == EqZInt32); return 0; } else {