[flang-commits] [flang] 1066eb5 - [flang] Fix a warning

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Mon May 13 09:33:49 PDT 2024


Author: Kazu Hirata
Date: 2024-05-13T09:33:43-07:00
New Revision: 1066eb55477044a3a92f3a40471375194dfcdbc8

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

LOG: [flang] Fix a warning

This patch fixes:

  flang/lib/Lower/OpenMP/OpenMP.cpp:2346:14: error: unused variable
  'origDirective' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    flang/lib/Lower/OpenMP/OpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index eaf4b5f997ff7..f9ba2fcbbca74 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2352,6 +2352,7 @@ genOMP(Fortran::lower::AbstractConverter &converter,
 
   assert(llvm::omp::blockConstructSet.test(origDirective) &&
          "Expected block construct");
+  (void)origDirective;
 
   for (const Clause &clause : clauses) {
     mlir::Location clauseLocation = converter.genLocation(clause.source);


        


More information about the flang-commits mailing list