[flang-commits] [flang] 3f2f700 - [flang] Fix -Wunused-but-set-variable in Bridge.cpp (NFC)
Jie Fu via flang-commits
flang-commits at lists.llvm.org
Fri Apr 5 16:32:56 PDT 2024
Author: Jie Fu
Date: 2024-04-06T07:31:53+08:00
New Revision: 3f2f700633bbcc0cb5ada17f5736b43f9c1e426e
URL: https://github.com/llvm/llvm-project/commit/3f2f700633bbcc0cb5ada17f5736b43f9c1e426e
DIFF: https://github.com/llvm/llvm-project/commit/3f2f700633bbcc0cb5ada17f5736b43f9c1e426e.diff
LOG: [flang] Fix -Wunused-but-set-variable in Bridge.cpp (NFC)
llvm-project/flang/lib/Lower/Bridge.cpp:3775:14:
error: variable 'nbDeviceResidentObject' set but not used [-Werror,-Wunused-but-set-variable]
unsigned nbDeviceResidentObject = 0;
^
1 error generated.
Added:
Modified:
flang/lib/Lower/Bridge.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 478c8f4c17ec46..47bd6ace4e4b56 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -3772,7 +3772,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
localSymbols.pushScope();
auto transferKindAttr = fir::CUDADataTransferKindAttr::get(
builder.getContext(), fir::CUDADataTransferKind::DeviceHost);
- unsigned nbDeviceResidentObject = 0;
+ [[maybe_unused]] unsigned nbDeviceResidentObject = 0;
for (const Fortran::semantics::Symbol &sym :
Fortran::evaluate::CollectSymbols(assign.rhs)) {
if (const auto *details =
More information about the flang-commits
mailing list