Skip to content

[flang] Use C-style casts to silence message (NFC) #131796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

kkwli
Copy link
Collaborator

@kkwli kkwli commented Mar 18, 2025

No description provided.

@kkwli kkwli self-assigned this Mar 18, 2025
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Mar 18, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Kelvin Li (kkwli)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/131796.diff

1 Files Affected:

  • (modified) flang/lib/Lower/OpenMP/Clauses.cpp (+1-1)
diff --git a/flang/lib/Lower/OpenMP/Clauses.cpp b/flang/lib/Lower/OpenMP/Clauses.cpp
index 86d78e0358677..f98cc0c83d179 100644
--- a/flang/lib/Lower/OpenMP/Clauses.cpp
+++ b/flang/lib/Lower/OpenMP/Clauses.cpp
@@ -164,8 +164,8 @@ std::optional<Object> getBaseObject(const Object &object,
       // as the symbol in the input object,
       // e.g. A(i) is represented as {Symbol(A), Designator(ArrayRef(A, i))}.
       // Here we have the Symbol(A), which is what we started with.
+      (void)symRef;
       assert(&**symRef == object.sym());
-      [[maybe_unused]] auto *unused = symRef;
       return std::nullopt;
     }
   } else {

Copy link
Member

@Meinersbur Meinersbur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@kkwli kkwli merged commit 6c7c660 into llvm:main Mar 18, 2025
14 checks passed
@kkwli kkwli deleted the silent-set-but-not-used-2 branch March 18, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants