[flang-commits] [flang] b1b4bf0 - [flang] Fix build warning on now-unused variable (#70852)

via flang-commits flang-commits at lists.llvm.org
Tue Oct 31 12:52:24 PDT 2023


Author: Peter Klausler
Date: 2023-10-31T12:52:20-07:00
New Revision: b1b4bf0618d391d1c9e961d0b4f86e99be0b9e3b

URL: https://github.com/llvm/llvm-project/commit/b1b4bf0618d391d1c9e961d0b4f86e99be0b9e3b
DIFF: https://github.com/llvm/llvm-project/commit/b1b4bf0618d391d1c9e961d0b4f86e99be0b9e3b.diff

LOG: [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.

Added: 
    

Modified: 
    flang/lib/Evaluate/type.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Evaluate/type.cpp b/flang/lib/Evaluate/type.cpp
index 72e385104cd6412..9c5c57a45aee59f 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;


        


More information about the flang-commits mailing list