Skip to content

Commit 2934bd7

Browse files
committed
fix(core): Suppress unused variable warnings in halo_pattern.hpp
Add [[maybe_unused]] attributes to global_world and grid variables that are not currently used but may be needed for future features. Fixes compilation warnings in Release builds where the compiler is more aggressive about detecting unused variables.
1 parent 3a899d5 commit 2934bd7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/openpfc/core/halo_pattern.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ core::SparseVector<BackendTag, size_t>
197197
create_recv_halo(const decomposition::Decomposition &decomp, int rank,
198198
const Int3 &direction, int halo_width) {
199199
const auto &local_world = decomposition::get_subworld(decomp, rank);
200-
const auto &global_world = decomposition::get_global_world(decomp);
201-
const auto &grid = decomposition::get_grid(decomp);
200+
[[maybe_unused]] const auto &global_world =
201+
decomposition::get_global_world(decomp);
202+
[[maybe_unused]] const auto &grid = decomposition::get_grid(decomp);
202203

203204
auto local_size = world::get_size(local_world);
204205
auto local_lower = world::get_lower(local_world);

0 commit comments

Comments
 (0)