[flang-commits] [flang] 91be47d - [flang] Fix warnings

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Wed Jun 11 08:54:00 PDT 2025


Author: Kazu Hirata
Date: 2025-06-11T08:53:54-07:00
New Revision: 91be47dccfa3480c152916838404d49107fde45c

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

LOG: [flang] Fix warnings

This patch fixes:

  flang/lib/Lower/OpenMP/OpenMP.cpp:3904:9: error: unused variable
  'action0' [-Werror,-Wunused-variable]

  flang/lib/Lower/OpenMP/OpenMP.cpp:3905:9: error: unused variable
  'action1' [-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 3f3b85696db31..c13fa471978db 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -3911,6 +3911,8 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
       // Capturing operation.
       assert(action0 != analysis.None && action1 != analysis.None &&
              "Expexcing two actions");
+      (void)action0;
+      (void)action1;
       captureOp =
           builder.create<mlir::omp::AtomicCaptureOp>(loc, hint, memOrder);
       // Set the non-atomic insertion point to before the atomic.capture.


        


More information about the flang-commits mailing list