Skip to content

Commit 3f2f700

Browse files
committed
[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.
1 parent 2d3c827 commit 3f2f700

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Lower/Bridge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3772,7 +3772,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
37723772
localSymbols.pushScope();
37733773
auto transferKindAttr = fir::CUDADataTransferKindAttr::get(
37743774
builder.getContext(), fir::CUDADataTransferKind::DeviceHost);
3775-
unsigned nbDeviceResidentObject = 0;
3775+
[[maybe_unused]] unsigned nbDeviceResidentObject = 0;
37763776
for (const Fortran::semantics::Symbol &sym :
37773777
Fortran::evaluate::CollectSymbols(assign.rhs)) {
37783778
if (const auto *details =

0 commit comments

Comments
 (0)