From b1b4bf0618d391d1c9e961d0b4f86e99be0b9e3b Mon Sep 17 00:00:00 2001 From: Peter Klausler <35819229+klausler@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:52:20 -0700 Subject: [PATCH] [flang] Fix build warning on now-unused variable (#70852) A recent change of mine caused a local variable to become obsolete in its function, leading to a warning with some build compilers that is fatal under -Werror, breaking a build bot. Remove the variable. --- flang/lib/Evaluate/type.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/flang/lib/Evaluate/type.cpp b/flang/lib/Evaluate/type.cpp index 72e385104cd64..9c5c57a45aee5 100644 --- a/flang/lib/Evaluate/type.cpp +++ b/flang/lib/Evaluate/type.cpp @@ -37,9 +37,7 @@ static bool IsDescriptor(const ObjectEntityDetails &details) { if (IsDescriptor(details.type()) || details.IsAssumedRank()) { return true; } - std::size_t j{0}; for (const ShapeSpec &shapeSpec : details.shape()) { - ++j; if (const auto &ub{shapeSpec.ubound().GetExplicit()}) { if (!IsConstantExpr(*ub)) { return true;