From f8183ce34ffb818e34ae5e2e4d8b348edd50c466 Mon Sep 17 00:00:00 2001 From: Pete Steinfeld <47540744+psteinfeld@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:03:18 -0700 Subject: [PATCH] [flang] Fix warning in build (#100134) Summary: After tblah's update #99817, I'm getting a warning about an unusedvariable. It looks to me like the warning is bogus, possibly due to a bug in the compiler I'm using (GCC 9.3.0). But adding a "maybe_unused" clause fixes it and makes my builds clean. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251162 --- flang/lib/Lower/DirectivesCommon.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flang/lib/Lower/DirectivesCommon.h b/flang/lib/Lower/DirectivesCommon.h index 5b8d1f2359c5bb..24cb7c2fcf7db8 100644 --- a/flang/lib/Lower/DirectivesCommon.h +++ b/flang/lib/Lower/DirectivesCommon.h @@ -137,7 +137,8 @@ static inline void genOmpAtomicHintAndMemoryOrderClauses( } template -static void processOmpAtomicTODO(mlir::Type elementType, mlir::Location loc) { +static void processOmpAtomicTODO(mlir::Type elementType, + [[maybe_unused]] mlir::Location loc) { if (!elementType) return; if constexpr (std::is_same