[flang-commits] [flang] bcfdab8 - [flang] Fix a warning

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Mon Jan 22 11:25:01 PST 2024


Author: Kazu Hirata
Date: 2024-01-22T11:24:55-08:00
New Revision: bcfdab87052116ce7bf2a9d9b2b1cc2e40a43618

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

LOG: [flang] Fix a warning

This patch fixes:

  flang/lib/Lower/OpenACC.cpp:1964:15: error: unused variable
  'loopDirective' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    flang/lib/Lower/OpenACC.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp
index 474d4e686c1350..d619d47fc23597 100644
--- a/flang/lib/Lower/OpenACC.cpp
+++ b/flang/lib/Lower/OpenACC.cpp
@@ -1974,6 +1974,7 @@ genACC(Fortran::lower::AbstractConverter &converter,
 
   assert(loopDirective.v == llvm::acc::ACCD_loop &&
          "Unsupported OpenACC loop construct");
+  (void)loopDirective;
 
   const auto &accClauseList =
       std::get<Fortran::parser::AccClauseList>(beginLoopDirective.t);


        


More information about the flang-commits mailing list