diff --git a/examples/callback/callback.cc b/examples/callback/callback.cc index 58d823015f..e2039ea9d0 100644 --- a/examples/callback/callback.cc +++ b/examples/callback/callback.cc @@ -110,7 +110,7 @@ struct MyObj { struct MyCol : vt::Collection { }; // Collection handler callback endpoint -void colHan(MyCol* col, TestMsg* msg) { +void colHan([[maybe_unused]] MyCol* col, [[maybe_unused]] TestMsg* msg) { printOutput(msg, "MyCol colHan (non-intrusive)"); } diff --git a/examples/collection/jacobi1d_vt.cc b/examples/collection/jacobi1d_vt.cc index 3a10699029..9f5b748dfc 100644 --- a/examples/collection/jacobi1d_vt.cc +++ b/examples/collection/jacobi1d_vt.cc @@ -227,7 +227,7 @@ struct LinearPb1DJacobi : vt::Collection { } - void doIter(BlankMsg *msg) { + void doIter([[maybe_unused]] BlankMsg *msg) { // // Treat the particular case of 1 object diff --git a/examples/collection/jacobi2d_vt.cc b/examples/collection/jacobi2d_vt.cc index eba9608c43..ecbd266e10 100644 --- a/examples/collection/jacobi2d_vt.cc +++ b/examples/collection/jacobi2d_vt.cc @@ -274,7 +274,7 @@ struct LinearPb2DJacobi : vt::Collection { } - void doIter(BlankMsg *msg) { + void doIter([[maybe_unused]] BlankMsg *msg) { // // Treat the particular case of 1 object diff --git a/examples/collection/lb_iter.cc b/examples/collection/lb_iter.cc index 6d467b0347..43cf1af159 100644 --- a/examples/collection/lb_iter.cc +++ b/examples/collection/lb_iter.cc @@ -61,7 +61,9 @@ struct IterCol : vt::Collection { static double weight = 1.0f; -void IterCol::iterWork(int64_t work_amt, int64_t iter, int subphase) { +void IterCol::iterWork( + int64_t work_amt, [[maybe_unused]] int64_t iter, int subphase +) { this->lb_data_.setSubPhase(subphase); double val = 0.1f; double val2 = 0.4f * work_amt; diff --git a/examples/collection/transpose.cc b/examples/collection/transpose.cc index 0c016c876d..89e5d35848 100644 --- a/examples/collection/transpose.cc +++ b/examples/collection/transpose.cc @@ -176,7 +176,7 @@ struct Block : vt::Collection { } } - void solve(SolveMsg* msg) { + void solve([[maybe_unused]] SolveMsg* msg) { // Invoke initialize here so that the index is ready initialize(); // Wait for all initializations to complete @@ -190,7 +190,9 @@ struct Block : vt::Collection { //using ActiveMapTypedFnType = NodeType(IndexT*, IndexT*, NodeType); template -vt::NodeType my_map(IndexT* idx, IndexT* max_idx, vt::NodeType num_nodes) { +vt::NodeType my_map( + IndexT* idx, [[maybe_unused]] IndexT* max_idx, vt::NodeType num_nodes +) { // simple round-robin for 1-d only. return idx->x() % num_nodes; } diff --git a/examples/group/group_collective.cc b/examples/group/group_collective.cc index e43a4b0e5e..0452e7e701 100644 --- a/examples/group/group_collective.cc +++ b/examples/group/group_collective.cc @@ -46,7 +46,7 @@ /// [Collective group creation] struct HelloGroupMsg : vt::Message { }; -static void hello_group_handler(HelloGroupMsg* msg) { +static void hello_group_handler([[maybe_unused]] HelloGroupMsg* msg) { fmt::print("{}: Hello from group handler\n", vt::theContext()->getNode()); } diff --git a/examples/hello_world/hello_world_functor.cc b/examples/hello_world/hello_world_functor.cc index fffd344172..306fdb2be9 100644 --- a/examples/hello_world/hello_world_functor.cc +++ b/examples/hello_world/hello_world_functor.cc @@ -64,7 +64,7 @@ struct MultipleFunctions { fmt::print("{}: MultipleFunctions -> Hello from node {}\n", vt::theContext()->getNode(), msg->from); } - void operator()(AnotherMsg* msg) const { + void operator()([[maybe_unused]] AnotherMsg* msg) const { fmt::print("{}: MultipleFunctions with AnotherMsg\n", vt::theContext()->getNode()); } }; diff --git a/examples/rdma/rdma_simple_get.cc b/examples/rdma/rdma_simple_get.cc index 77d60accf9..1ea468bcc9 100644 --- a/examples/rdma/rdma_simple_get.cc +++ b/examples/rdma/rdma_simple_get.cc @@ -77,7 +77,7 @@ static void tell_handle(HandleMsg* msg) { static std::unique_ptr my_data = nullptr; static vt::RDMA_GetType test_get_fn( - vt::BaseMessage*, vt::ByteType num_bytes, vt::ByteType offset, vt::TagType tag, + vt::BaseMessage*, vt::ByteType num_bytes, [[maybe_unused]] vt::ByteType offset, vt::TagType tag, bool ) { vt::NodeType this_node = vt::theContext()->getNode(); diff --git a/src/vt/collective/barrier/barrier.cc b/src/vt/collective/barrier/barrier.cc index 80986b70f4..ad8e2a5f64 100644 --- a/src/vt/collective/barrier/barrier.cc +++ b/src/vt/collective/barrier/barrier.cc @@ -91,7 +91,9 @@ Barrier::BarrierStateType& Barrier::insertFindBarrier( } void Barrier::removeBarrier( - bool const& is_named, bool const& is_wait, BarrierType const& barrier + bool const& is_named, + [[maybe_unused]] bool const& is_wait, + BarrierType const& barrier ) { auto& state = is_named ? named_barrier_state_ : unnamed_barrier_state_; diff --git a/src/vt/collective/reduce/operators/callback_op.h b/src/vt/collective/reduce/operators/callback_op.h index ab143d0b8d..d9f8147a9d 100644 --- a/src/vt/collective/reduce/operators/callback_op.h +++ b/src/vt/collective/reduce/operators/callback_op.h @@ -50,7 +50,7 @@ namespace vt { namespace collective { namespace reduce { namespace operators { template struct ReduceCallback { - void operator()(T* t) const { /* do nothing */ } + void operator()([[maybe_unused]] T* t) const { /* do nothing */ } }; }}}} /* end namespace vt::collective::reduce::operators */ diff --git a/src/vt/collective/reduce/operators/functors/none_op.h b/src/vt/collective/reduce/operators/functors/none_op.h index eb87e9f0b7..958d1406c8 100644 --- a/src/vt/collective/reduce/operators/functors/none_op.h +++ b/src/vt/collective/reduce/operators/functors/none_op.h @@ -57,7 +57,7 @@ struct None { "Must be empty data" ); - void operator()(T& v1, T const& v2) {} + void operator()([[maybe_unused]] T& v1, [[maybe_unused]] T const& v2) {} }; }}}} /* end namespace vt::collective::reduce::operators */ diff --git a/src/vt/collective/reduce/operators/functors/tuple_op_helper.h b/src/vt/collective/reduce/operators/functors/tuple_op_helper.h index 595b809351..096f2cd8ad 100644 --- a/src/vt/collective/reduce/operators/functors/tuple_op_helper.h +++ b/src/vt/collective/reduce/operators/functors/tuple_op_helper.h @@ -65,7 +65,9 @@ struct ApplyOp> { template struct ApplyOp> { template - static void apply(Tuple1& t1, Tuple2 const& t2) { } + static void apply( + [[maybe_unused]] Tuple1& t1, [[maybe_unused]] Tuple2 const& t2 + ) { } }; // diff --git a/src/vt/configs/arguments/args.cc b/src/vt/configs/arguments/args.cc index 628f4fd88f..ee12032963 100644 --- a/src/vt/configs/arguments/args.cc +++ b/src/vt/configs/arguments/args.cc @@ -701,7 +701,9 @@ ArgConfig::construct(std::unique_ptr arg) { class VtFormatter : public CLI::Formatter { public: - std::string make_usage(const CLI::App *, std::string name) const override { + std::string make_usage( + const CLI::App *, [[maybe_unused]] std::string name + ) const override { std::stringstream u; u << "\n" "Usage:" diff --git a/src/vt/configs/error/assert_out.impl.h b/src/vt/configs/error/assert_out.impl.h index 49bc8e5d85..86d8d9c771 100644 --- a/src/vt/configs/error/assert_out.impl.h +++ b/src/vt/configs/error/assert_out.impl.h @@ -80,7 +80,7 @@ std::enable_if_t>::value == 0> assertOut( bool fail, std::string const cond, std::string const& str, std::string const& file, int const line, std::string const& func, - ErrorCodeType error, std::tuple&& tup + ErrorCodeType error, [[maybe_unused]] std::tuple&& tup ) { auto msg = "Assertion failed:"; auto assert_fail_str = stringizeMessage(msg,str,cond,file,line,func,error); diff --git a/src/vt/configs/error/assert_out_info.impl.h b/src/vt/configs/error/assert_out_info.impl.h index 5ab4713321..1e6c569b47 100644 --- a/src/vt/configs/error/assert_out_info.impl.h +++ b/src/vt/configs/error/assert_out_info.impl.h @@ -67,7 +67,8 @@ std::enable_if_t>::value == 0> assertOutInfo( bool fail, std::string const cond, std::string const& str, std::string const& file, int const line, std::string const& func, - ErrorCodeType error, std::tuple&& tup, std::tuple&& t2 + ErrorCodeType error, [[maybe_unused]] std::tuple&& tup, + std::tuple&& t2 ) { return assertOut( fail,cond,str,file,line,func,error,std::forward>(t2) diff --git a/src/vt/configs/error/error.impl.h b/src/vt/configs/error/error.impl.h index ea4f177442..55e4e3fcc2 100644 --- a/src/vt/configs/error/error.impl.h +++ b/src/vt/configs/error/error.impl.h @@ -62,7 +62,9 @@ namespace vt { namespace error { template inline std::enable_if_t>::value == 0> -display(std::string const& str, ErrorCodeType error, Args&&... args) { +display( + std::string const& str, ErrorCodeType error, [[maybe_unused]] Args&&... args +) { std::string const inf = ::fmt::format("FATAL ERROR: {}\n",str); return ::vt::abort(inf,error); } @@ -81,7 +83,7 @@ std::enable_if_t>::value == 0> displayLoc( std::string const& str, ErrorCodeType error, std::string const& file, int const line, std::string const& func, - std::tuple&& tup + [[maybe_unused]] std::tuple&& tup ) { auto msg = "vtAbort() Invoked"; auto const inf = debug::stringizeMessage(msg,str,"",file,line,func,error); diff --git a/src/vt/configs/error/soft_error.h b/src/vt/configs/error/soft_error.h index 9876f797a0..0180248585 100644 --- a/src/vt/configs/error/soft_error.h +++ b/src/vt/configs/error/soft_error.h @@ -86,7 +86,7 @@ inline std::enable_if_t>::value == 0> warningImpl( std::string const& str, ErrorCodeType error, bool quit, std::string const& file, int const line, std::string const& func, - Args&&... args + [[maybe_unused]] Args&&... args ) { auto msg = "vtWarn() Invoked"; auto inf = debug::stringizeMessage(msg,str,"",file,line,func,error); diff --git a/src/vt/context/context.cc b/src/vt/context/context.cc index 86f2998dd6..db02f6a11a 100644 --- a/src/vt/context/context.cc +++ b/src/vt/context/context.cc @@ -71,7 +71,7 @@ struct RunnableNew {}; namespace vt { namespace ctx { -Context::Context(bool const is_interop, MPI_Comm comm) { +Context::Context([[maybe_unused]] bool const is_interop, MPI_Comm comm) { #if DEBUG_VT_CONTEXT fmt::print( "Context::Context is_interop={}, comm={}\n", print_bool(is_interop), comm diff --git a/src/vt/event/event.cc b/src/vt/event/event.cc index d3de8b195c..c367a6cfcb 100644 --- a/src/vt/event/event.cc +++ b/src/vt/event/event.cc @@ -198,7 +198,7 @@ void AsyncEvent::finalize() { event_container_.clear(); } -int AsyncEvent::progress(TimeType current_time) { +int AsyncEvent::progress([[maybe_unused]] TimeType current_time) { theEvent()->testEventsTrigger(); return 0; } diff --git a/src/vt/group/collective/group_info_collective.cc b/src/vt/group/collective/group_info_collective.cc index 2ded4cc4ef..9cb25f6fc4 100644 --- a/src/vt/group/collective/group_info_collective.cc +++ b/src/vt/group/collective/group_info_collective.cc @@ -186,7 +186,7 @@ void InfoColl::setupCollective() { ); GroupOnlyTMsg::registerContinuationT( new_tree_cont_, - [group_](MsgSharedPtr msg){ + [group_]([[maybe_unused]] MsgSharedPtr msg){ auto iter = theGroup()->local_collective_group_info_.find(group_); vtAssertExpr(iter != theGroup()->local_collective_group_info_.end()); auto const& from = theContext()->getFromNodeCurrentTask(); @@ -766,7 +766,7 @@ void InfoColl::finalizeTree(GroupOnlyMsg* msg) { finalize(); } -void InfoColl::downTreeFinished(GroupOnlyMsg* msg) { +void InfoColl::downTreeFinished([[maybe_unused]] GroupOnlyMsg* msg) { send_down_finished_++; finalize(); } diff --git a/src/vt/group/group_manager.cc b/src/vt/group/group_manager.cc index 6e7f8a1d4c..835dbb7031 100644 --- a/src/vt/group/group_manager.cc +++ b/src/vt/group/group_manager.cc @@ -192,8 +192,8 @@ void GroupManager::triggerContinuation(RemoteOperationIDType const op) { } void GroupManager::initializeRemoteGroup( - GroupType const group, RegionPtrType in_region, bool const is_static, - RegionType::SizeType const group_size + GroupType const group, RegionPtrType in_region, + [[maybe_unused]] bool const is_static, RegionType::SizeType const group_size ) { auto group_info = std::make_unique( info_rooted_remote_cons, default_comm_, @@ -227,8 +227,8 @@ MPI_Comm GroupManager::getGroupComm(GroupType const group_id) { } void GroupManager::initializeLocalGroupCollective( - GroupType const group, bool const is_static, ActionType action, - bool const in_group, bool make_mpi_group + GroupType const group, [[maybe_unused]] bool const is_static, + ActionType action, bool const in_group, bool make_mpi_group ) { auto group_info = std::make_unique( info_collective_cons, default_comm_, @@ -244,7 +244,8 @@ void GroupManager::initializeLocalGroupCollective( } void GroupManager::initializeLocalGroup( - GroupType const group, RegionPtrType in_region, bool const is_static, ActionType action + GroupType const group, RegionPtrType in_region, + [[maybe_unused]] bool const is_static, ActionType action ) { auto const group_size = in_region->getSize(); diff --git a/src/vt/messaging/active.cc b/src/vt/messaging/active.cc index 32e6f32f8c..c7e58404bb 100644 --- a/src/vt/messaging/active.cc +++ b/src/vt/messaging/active.cc @@ -1152,7 +1152,7 @@ bool ActiveMessenger::testPendingAsyncOps() { ); } -int ActiveMessenger::progress(TimeType current_time) { +int ActiveMessenger::progress([[maybe_unused]] TimeType current_time) { bool const started_irecv_active_msg = tryProcessIncomingActiveMsg(); bool const started_irecv_data_msg = tryProcessDataMsgRecv(); bool const received_active_msg = testPendingActiveMsgAsyncRecv(); diff --git a/src/vt/messaging/active.impl.h b/src/vt/messaging/active.impl.h index 2cb263f9ea..13c94651e3 100644 --- a/src/vt/messaging/active.impl.h +++ b/src/vt/messaging/active.impl.h @@ -220,7 +220,7 @@ ActiveMessenger::PendingSendType ActiveMessenger::sendMsgAuto( template * f> ActiveMessenger::PendingSendType ActiveMessenger::broadcastMsgSz( MsgPtrThief msg, - ByteType msg_size, + [[maybe_unused]] ByteType msg_size, bool deliver_to_sender, TagType tag ) { @@ -265,7 +265,7 @@ template * f> ActiveMessenger::PendingSendType ActiveMessenger::sendMsgSz( NodeType dest, MsgPtrThief msg, - ByteType msg_size, + [[maybe_unused]] ByteType msg_size, TagType tag ) { auto const han = auto_registry::makeAutoHandler(); diff --git a/src/vt/messaging/message/message_priority.impl.h b/src/vt/messaging/message/message_priority.impl.h index 9db6ee43fb..9df9c81526 100644 --- a/src/vt/messaging/message/message_priority.impl.h +++ b/src/vt/messaging/message/message_priority.impl.h @@ -49,21 +49,27 @@ namespace vt { namespace messaging { template -void msgSetPriorityLevel(MsgT ptr, PriorityLevelType level) { +void msgSetPriorityLevel( + [[maybe_unused]] MsgT ptr, [[maybe_unused]] PriorityLevelType level +) { # if vt_check_enabled(priorities) envelopeSetPriorityLevel(ptr->env, level); # endif } template -void msgSetPriorityAllLevels(MsgT ptr, PriorityType priority) { +void msgSetPriorityAllLevels( + [[maybe_unused]] MsgT ptr, [[maybe_unused]] PriorityType priority +) { # if vt_check_enabled(priorities) envelopeSetPriority(ptr->env, priority); # endif } template -bool msgIncPriorityLevel(MsgT old_msg, MsgU new_msg) { +bool msgIncPriorityLevel( + [[maybe_unused]] MsgT old_msg, [[maybe_unused]] MsgU new_msg +) { # if vt_check_enabled(priorities) auto const level = envelopeGetPriorityLevel(old_msg->env); if (level + 1 < sched::priority_num_levels) { @@ -78,7 +84,11 @@ bool msgIncPriorityLevel(MsgT old_msg, MsgU new_msg) { } template -void msgSetPriority(MsgU new_msg, PriorityType priority, bool increment_level) { +void msgSetPriority( + [[maybe_unused]] MsgU new_msg, + [[maybe_unused]] PriorityType priority, + [[maybe_unused]] bool increment_level +) { # if vt_check_enabled(priorities) PriorityLevelType const level = increment_level ? 1 : 0; PriorityType old_priority = vt::min_priority; @@ -88,8 +98,10 @@ void msgSetPriority(MsgU new_msg, PriorityType priority, bool increment_level) { template void msgSetPriorityImpl( - MsgU new_msg, PriorityType new_priority, PriorityType old_priority, - PriorityLevelType level + [[maybe_unused]] MsgU new_msg, + [[maybe_unused]] PriorityType new_priority, + [[maybe_unused]] PriorityType old_priority, + [[maybe_unused]] PriorityLevelType level ) { # if vt_check_enabled(priorities) @@ -115,7 +127,8 @@ void msgSetPriorityImpl( template void msgSetPriorityFrom( - MsgT old_msg, MsgU new_msg, PriorityType priority, bool increment_level + [[maybe_unused]] MsgT old_msg, [[maybe_unused]] MsgU new_msg, + [[maybe_unused]] PriorityType priority, [[maybe_unused]] bool increment_level ) { # if vt_check_enabled(priorities) vtAssert(old_msg != nullptr, "Must have a valid message"); @@ -130,7 +143,9 @@ void msgSetPriorityFrom( } template -void msgSystemSetPriority(MsgT ptr, PriorityType priority) { +void msgSystemSetPriority( + [[maybe_unused]] MsgT ptr, [[maybe_unused]] PriorityType priority +) { # if vt_check_enabled(priorities) PriorityType prior = no_priority; envelopeSetPriorityLevel(ptr->env, 0); diff --git a/src/vt/messaging/param_msg.h b/src/vt/messaging/param_msg.h index 1ad19f0f5c..095b1e63c4 100644 --- a/src/vt/messaging/param_msg.h +++ b/src/vt/messaging/param_msg.h @@ -77,14 +77,16 @@ struct MsgProps { return std::move(*this); } - MsgProps&& withPriority(PriorityType in_priority) { + MsgProps&& withPriority([[maybe_unused]] PriorityType in_priority) { #if vt_check_enabled(priorities) priority_ = in_priority; #endif return std::move(*this); } - MsgProps&& withPriorityLevel(PriorityLevelType in_priority_level) { + MsgProps&& withPriorityLevel( + [[maybe_unused]] PriorityLevelType in_priority_level + ) { #if vt_check_enabled(priorities) priority_level_ = in_priority_level; #endif diff --git a/src/vt/objgroup/holder/holder_basic.h b/src/vt/objgroup/holder/holder_basic.h index d752843e5b..0f8d643893 100644 --- a/src/vt/objgroup/holder/holder_basic.h +++ b/src/vt/objgroup/holder/holder_basic.h @@ -64,7 +64,7 @@ struct HolderBasic final : HolderObjBase { std::byte* getPtr() override { return reinterpret_cast(obj_); } template - void reset(Args&&... args) { + void reset([[maybe_unused]] Args&&... args) { vtAssert(false, "HolderBasic is not resetable"); } diff --git a/src/vt/objgroup/proxy/proxy_objgroup.impl.h b/src/vt/objgroup/proxy/proxy_objgroup.impl.h index f594ae6abe..a0779cf7fd 100644 --- a/src/vt/objgroup/proxy/proxy_objgroup.impl.h +++ b/src/vt/objgroup/proxy/proxy_objgroup.impl.h @@ -150,7 +150,9 @@ typename Proxy::PendingSendType Proxy::multicast( auto groupID = theGroup()->GetTempGroupForRange(range); if (!groupID.has_value()) { - groupID = theGroup()->newGroup(std::move(nodes), [](GroupType type) {}); + groupID = theGroup()->newGroup( + std::move(nodes), []([[maybe_unused]] GroupType type) {} + ); theGroup()->AddNewTempGroup(range, groupID.value()); } diff --git a/src/vt/pipe/callback/anon/callback_anon.impl.h b/src/vt/pipe/callback/anon/callback_anon.impl.h index 04378a0a29..e4b039d8d3 100644 --- a/src/vt/pipe/callback/anon/callback_anon.impl.h +++ b/src/vt/pipe/callback/anon/callback_anon.impl.h @@ -67,7 +67,9 @@ void CallbackAnon::serialize(SerializerT& s) { template template typename CallbackAnon::template IsVoidType -CallbackAnon::triggerDispatch(SignalDataType* data, PipeType const& pid) { +CallbackAnon::triggerDispatch( + [[maybe_unused]] SignalDataType* data, PipeType const& pid +) { // Overload when the signal is void auto const& this_node = theContext()->getNode(); auto const& pipe_node = PipeIDBuilder::getNode(pid); @@ -115,7 +117,7 @@ void CallbackAnon::trigger_(SignalDataType* data, PipeType const& pid) { } template -void CallbackAnon::trigger_(SignalDataType* data) { +void CallbackAnon::trigger_([[maybe_unused]] SignalDataType* data) { vtAssert(0, "Should not be reachable in this derived class"); } diff --git a/src/vt/pipe/callback/anon/callback_anon_listener.impl.h b/src/vt/pipe/callback/anon/callback_anon_listener.impl.h index 05f9bfa413..d75e302e85 100644 --- a/src/vt/pipe/callback/anon/callback_anon_listener.impl.h +++ b/src/vt/pipe/callback/anon/callback_anon_listener.impl.h @@ -75,7 +75,9 @@ void AnonListener::trigger_(SignalDataType* data) { } template -void AnonListener::trigger_(SignalDataType* data, PipeType const& pipe_id) { +void AnonListener::trigger_( + SignalDataType* data, [[maybe_unused]] PipeType const& pipe_id +) { return trigger_(data); } diff --git a/src/vt/pipe/callback/anon/callback_anon_tl.h b/src/vt/pipe/callback/anon/callback_anon_tl.h index b68e31fda5..f991d37da0 100644 --- a/src/vt/pipe/callback/anon/callback_anon_tl.h +++ b/src/vt/pipe/callback/anon/callback_anon_tl.h @@ -61,7 +61,7 @@ struct CallbackAnonTypeless : CallbackBaseTL { template void serialize(SerializerT& s); - bool operator==(CallbackAnonTypeless const& other) const { + bool operator==([[maybe_unused]] CallbackAnonTypeless const& other) const { return true; } diff --git a/src/vt/pipe/callback/anon/callback_anon_tl.impl.h b/src/vt/pipe/callback/anon/callback_anon_tl.impl.h index 99605e6411..2d727c9adc 100644 --- a/src/vt/pipe/callback/anon/callback_anon_tl.impl.h +++ b/src/vt/pipe/callback/anon/callback_anon_tl.impl.h @@ -57,7 +57,7 @@ namespace vt { namespace pipe { namespace callback { template -void CallbackAnonTypeless::serialize(SerializerT& s) {} +void CallbackAnonTypeless::serialize([[maybe_unused]] SerializerT& s) {} template void CallbackAnonTypeless::trigger(MsgT* msg, PipeType const& pipe) { diff --git a/src/vt/pipe/callback/callback_base.h b/src/vt/pipe/callback/callback_base.h index 00aa10301c..f6b1f55407 100644 --- a/src/vt/pipe/callback/callback_base.h +++ b/src/vt/pipe/callback/callback_base.h @@ -95,7 +95,9 @@ struct CallbackBase { protected: virtual void trigger_(SignalDataType* data) = 0; - virtual void trigger_(SignalDataType* data, PipeType const& pipe_id) { + virtual void trigger_( + SignalDataType* data, [[maybe_unused]] PipeType const& pipe_id + ) { return trigger_(data); } diff --git a/src/vt/pipe/callback/callback_base_tl.h b/src/vt/pipe/callback/callback_base_tl.h index 29bbf0c06c..adae2dabaa 100644 --- a/src/vt/pipe/callback/callback_base_tl.h +++ b/src/vt/pipe/callback/callback_base_tl.h @@ -54,7 +54,7 @@ struct CallbackBaseTL { CallbackBaseTL() = default; template - void serialize(SerializerT& s) { } + void serialize([[maybe_unused]] SerializerT& s) { } template void trigger(MsgT* msg, PipeType const& pipe) { diff --git a/src/vt/pipe/callback/handler_bcast/callback_bcast.impl.h b/src/vt/pipe/callback/handler_bcast/callback_bcast.impl.h index ac2e8e52b5..869b6f54cd 100644 --- a/src/vt/pipe/callback/handler_bcast/callback_bcast.impl.h +++ b/src/vt/pipe/callback/handler_bcast/callback_bcast.impl.h @@ -75,14 +75,16 @@ void CallbackBcast::trigger_(SignalDataType* data, PipeType const& pid) { } template -void CallbackBcast::trigger_(SignalDataType* data) { +void CallbackBcast::trigger_([[maybe_unused]] SignalDataType* data) { vtAssert(0, "Should not be reachable in this derived class"); } template template typename CallbackBcast::template IsVoidType -CallbackBcast::triggerDispatch(SignalDataType* data, PipeType const& pid) { +CallbackBcast::triggerDispatch( + [[maybe_unused]] SignalDataType* data, PipeType const& pid +) { auto const& this_node = theContext()->getNode(); vt_debug_print( terse, pipe, @@ -96,7 +98,9 @@ CallbackBcast::triggerDispatch(SignalDataType* data, PipeType const& pid) template template typename CallbackBcast::template IsNotVoidType -CallbackBcast::triggerDispatch(SignalDataType* data, PipeType const& pid) { +CallbackBcast::triggerDispatch( + SignalDataType* data, [[maybe_unused]] PipeType const& pid +) { auto const& this_node = theContext()->getNode(); vt_debug_print( terse, pipe, diff --git a/src/vt/pipe/callback/handler_send/callback_send.impl.h b/src/vt/pipe/callback/handler_send/callback_send.impl.h index fd172c0eab..8914102668 100644 --- a/src/vt/pipe/callback/handler_send/callback_send.impl.h +++ b/src/vt/pipe/callback/handler_send/callback_send.impl.h @@ -73,14 +73,16 @@ void CallbackSend::trigger_(SignalDataType* data, PipeType const& pid) { } template -void CallbackSend::trigger_(SignalDataType* data) { +void CallbackSend::trigger_([[maybe_unused]] SignalDataType* data) { vtAssert(0, "Should not be reachable in this derived class"); } template template typename CallbackSend::template IsVoidType -CallbackSend::triggerDispatch(SignalDataType* data, PipeType const& pid) { +CallbackSend::triggerDispatch( + [[maybe_unused]] SignalDataType* data, PipeType const& pid +) { auto const& this_node = theContext()->getNode(); vt_debug_print( terse, pipe, @@ -100,7 +102,9 @@ CallbackSend::triggerDispatch(SignalDataType* data, PipeType const& pid) { template template typename CallbackSend::template IsNotVoidType -CallbackSend::triggerDispatch(SignalDataType* data, PipeType const& pid) { +CallbackSend::triggerDispatch( + SignalDataType* data, [[maybe_unused]] PipeType const& pid +) { auto const& this_node = theContext()->getNode(); vt_debug_print( terse, pipe, diff --git a/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.h b/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.h index bfd553affb..4c2c9d78e0 100644 --- a/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.h +++ b/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.h @@ -69,7 +69,7 @@ struct CallbackObjGroupBcast : CallbackBaseTL { template void trigger(MsgT* msg, PipeType const& pipe); - void triggerVoid(PipeType const& pipe) { + void triggerVoid([[maybe_unused]] PipeType const& pipe) { vtAssert(0, "Must not be void"); } diff --git a/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.impl.h b/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.impl.h index 8be44cf633..dc04a81159 100644 --- a/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.impl.h +++ b/src/vt/pipe/callback/objgroup_bcast/callback_objgroup_bcast.impl.h @@ -58,7 +58,9 @@ void CallbackObjGroupBcast::serialize(SerializerT& s) { } template -void CallbackObjGroupBcast::trigger(MsgT* in_msg, PipeType const& pipe) { +void CallbackObjGroupBcast::trigger( + MsgT* in_msg, [[maybe_unused]] PipeType const& pipe +) { auto msg = promoteMsg(in_msg); envelopeSetGroup(msg->env, default_group); objgroup::broadcast(msg,handler_); diff --git a/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.h b/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.h index 3a53e664c0..18a16ead5e 100644 --- a/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.h +++ b/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.h @@ -70,7 +70,7 @@ struct CallbackObjGroupSend : CallbackBaseTL { template void trigger(MsgT* msg, PipeType const& pipe); - void triggerVoid(PipeType const& pipe) { + void triggerVoid([[maybe_unused]] PipeType const& pipe) { vtAssert(0, "Must not be void"); } diff --git a/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.impl.h b/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.impl.h index df945b9972..28cf2cdf28 100644 --- a/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.impl.h +++ b/src/vt/pipe/callback/objgroup_send/callback_objgroup_send.impl.h @@ -57,7 +57,9 @@ void CallbackObjGroupSend::serialize(SerializerT& s) { } template -void CallbackObjGroupSend::trigger(MsgT* in_msg, PipeType const& pipe) { +void CallbackObjGroupSend::trigger( + MsgT* in_msg, [[maybe_unused]] PipeType const& pipe +) { auto msg = promoteMsg(in_msg); objgroup::send(msg,handler_,node_); } diff --git a/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.h b/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.h index 42cd97e21f..bf21aac8a9 100644 --- a/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.h +++ b/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.h @@ -57,7 +57,9 @@ struct CallbackProxyBcastTypeless : CallbackBaseTL { template void serialize(SerializerT& s); - bool operator==(CallbackProxyBcastTypeless const& other) const { + bool operator==( + [[maybe_unused]] CallbackProxyBcastTypeless const& other + ) const { return true; } @@ -65,7 +67,7 @@ struct CallbackProxyBcastTypeless : CallbackBaseTL { template void trigger(MsgT* msg, PipeType const& pipe); - void triggerVoid(PipeType const& pipe) { + void triggerVoid([[maybe_unused]] PipeType const& pipe) { vtAssert(0, "Must not be void"); } }; @@ -94,7 +96,7 @@ struct CallbackProxyBcastDirect : CallbackBaseTL { template void trigger(MsgT* msg, PipeType const& pipe); - void triggerVoid(PipeType const& pipe) { + void triggerVoid([[maybe_unused]] PipeType const& pipe) { vtAssert(0, "Must not be void"); } diff --git a/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.impl.h b/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.impl.h index 4d30b5eb35..d51e587061 100644 --- a/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.impl.h +++ b/src/vt/pipe/callback/proxy_bcast/callback_proxy_bcast_tl.impl.h @@ -61,7 +61,7 @@ namespace vt { namespace pipe { namespace callback { template -void CallbackProxyBcastTypeless::serialize(SerializerT& s) {} +void CallbackProxyBcastTypeless::serialize([[maybe_unused]] SerializerT& s) {} template void CallbackProxyBcastTypeless::trigger(MsgT* msg, PipeType const& pipe) { diff --git a/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.h b/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.h index c307248316..f8856f5c3b 100644 --- a/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.h +++ b/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.h @@ -57,7 +57,9 @@ struct CallbackProxySendTypeless : CallbackBaseTL { template void serialize(SerializerT& s); - bool operator==(CallbackProxySendTypeless const& other) const { + bool operator==( + [[maybe_unused]] CallbackProxySendTypeless const& other + ) const { return true; } @@ -65,7 +67,7 @@ struct CallbackProxySendTypeless : CallbackBaseTL { template void trigger(MsgT* msg, PipeType const& pipe); - void triggerVoid(PipeType const& pipe) { + void triggerVoid([[maybe_unused]] PipeType const& pipe) { vtAssert(0, "Must not be void"); } }; @@ -91,7 +93,7 @@ struct CallbackProxySendDirect : CallbackBaseTL { template void trigger(MsgT* msg, PipeType const& pipe); - void triggerVoid(PipeType const& pipe) { + void triggerVoid([[maybe_unused]] PipeType const& pipe) { vtAssert(0, "Must not be void"); } diff --git a/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.impl.h b/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.impl.h index c63c437051..52abbf3426 100644 --- a/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.impl.h +++ b/src/vt/pipe/callback/proxy_send/callback_proxy_send_tl.impl.h @@ -58,7 +58,7 @@ namespace vt { namespace pipe { namespace callback { template -void CallbackProxySendTypeless::serialize(SerializerT& s) { } +void CallbackProxySendTypeless::serialize([[maybe_unused]] SerializerT& s) { } template void CallbackProxySendTypeless::trigger(MsgT* msg, PipeType const& pipe) { diff --git a/src/vt/pipe/pipe_manager.impl.h b/src/vt/pipe/pipe_manager.impl.h index 78d6776e77..c365726df1 100644 --- a/src/vt/pipe/pipe_manager.impl.h +++ b/src/vt/pipe/pipe_manager.impl.h @@ -67,7 +67,9 @@ namespace vt { namespace pipe { template -void PipeManager::triggerSendBack(PipeType const& pipe, MsgT* data) { +void PipeManager::triggerSendBack( + PipeType const& pipe, [[maybe_unused]] MsgT* data +) { auto const& this_node = theContext()->getNode(); auto const& node_back = PipeIDBuilder::getNode(pipe); if (node_back != this_node) { diff --git a/src/vt/pipe/pipe_manager_construct.h b/src/vt/pipe/pipe_manager_construct.h index 390f6b6247..b9b7878e6f 100644 --- a/src/vt/pipe/pipe_manager_construct.h +++ b/src/vt/pipe/pipe_manager_construct.h @@ -139,7 +139,7 @@ struct ConstructCallbacksImpl { template /*static*/ typename ConstructCallbacksImpl::ResultType -ConstructCallbacksImpl::make(ConsT const& ct) { +ConstructCallbacksImpl::make([[maybe_unused]] ConsT const& ct) { return {}; } diff --git a/src/vt/rdma/rdma.cc b/src/vt/rdma/rdma.cc index 3caaaa4396..d5a44314bf 100644 --- a/src/vt/rdma/rdma.cc +++ b/src/vt/rdma/rdma.cc @@ -242,7 +242,10 @@ RDMAManager::RDMAManager() // do a direct recv into the user buffer theMsg()->recvDataMsgBuffer( msg->nchunks, put_ptr_offset, recv_tag, recv_node, true, []{}, - [=](RDMA_GetType ptr, ActionType deleter){ + [=]( + [[maybe_unused]] RDMA_GetType ptr, + [[maybe_unused]] ActionType deleter + ){ vt_debug_print( normal, rdma, "putData: recv_data_msg_buffer DIRECT: offset={}\n", @@ -304,7 +307,8 @@ RDMAManager::RDMAManager() RDMA_HandleType RDMAManager::registerNewCollective( bool const& use_default, RDMA_PtrType const& ptr, ByteType const& num_bytes, - ByteType const& num_total_bytes, ByteType const& elm_size, RDMA_MapType const& map + [[maybe_unused]] ByteType const& num_total_bytes, ByteType const& elm_size, + RDMA_MapType const& map ) { auto const& han = registerNewRdmaHandler(use_default, ptr, num_bytes, true); @@ -423,8 +427,8 @@ void RDMAManager::requestGetData( } void RDMAManager::triggerGetRecvData( - RDMA_OpType const& op, TagType const& tag, RDMA_PtrType ptr, - ByteType const& num_bytes, ActionType const& action + RDMA_OpType const& op, [[maybe_unused]] TagType const& tag, + RDMA_PtrType ptr, ByteType const& num_bytes, ActionType const& action ) { auto iter = pending_ops_.find(op); @@ -518,7 +522,7 @@ void RDMAManager::triggerPutRecvData( RDMA_PtrType RDMAManager::tryPutPtr( - RDMA_HandleType const& han, TagType const& tag + RDMA_HandleType const& han, [[maybe_unused]] TagType const& tag ) { auto const& this_node = theContext()->getNode(); auto const& is_collective = RDMA_HandleManagerType::isCollective(han); @@ -1195,7 +1199,8 @@ RDMAManager::RDMA_ChannelLookupType RDMAManager::makeChannelLookup( RDMAManager::RDMA_ChannelType* RDMAManager::findChannel( RDMA_HandleType const& han, RDMA_TypeType const& rdma_op_type, NodeType const& target, - NodeType const& non_target, bool const& should_insert, bool const& must_exist + NodeType const& non_target, [[maybe_unused]] bool const& should_insert, + [[maybe_unused]] bool const& must_exist ) { auto chan_iter = channels_.find( makeChannelLookup(han,rdma_op_type,target,non_target) diff --git a/src/vt/rdma/rdma.h b/src/vt/rdma/rdma.h index eef08c840c..8bd8e1f302 100644 --- a/src/vt/rdma/rdma.h +++ b/src/vt/rdma/rdma.h @@ -574,8 +574,10 @@ struct RDMAManager : runtime::component::Component { * \param[in] action action when complete */ void newGetChannel( - RDMA_HandleType const& han, NodeType const& target, - NodeType const& non_target, ActionType const& action = nullptr + [[maybe_unused]] RDMA_HandleType const& han, + [[maybe_unused]] NodeType const& target, + [[maybe_unused]] NodeType const& non_target, + [[maybe_unused]] ActionType const& action = nullptr ) { #if vt_check_enabled(mpi_rdma) return newChannel( @@ -595,8 +597,10 @@ struct RDMAManager : runtime::component::Component { * \param[in] action action when complete */ void newPutChannel( - RDMA_HandleType const& han, NodeType const& target, - NodeType const& non_target, ActionType const& action = nullptr + [[maybe_unused]] RDMA_HandleType const& han, + [[maybe_unused]] NodeType const& target, + [[maybe_unused]] NodeType const& non_target, + [[maybe_unused]] ActionType const& action = nullptr ) { #if vt_check_enabled(mpi_rdma) diff --git a/src/vt/rdma/state/rdma_state.cc b/src/vt/rdma/state/rdma_state.cc index 21e920850f..89f0bb3f30 100644 --- a/src/vt/rdma/state/rdma_state.cc +++ b/src/vt/rdma/state/rdma_state.cc @@ -178,7 +178,7 @@ bool State::testReadyPutData(TagType const& tag) { /*static*/ RDMA_GetType State::defaultGetHandlerFn( StateMessage* msg, ByteType req_num_bytes, ByteType req_offset, - TagType tag, bool is_local + TagType tag, [[maybe_unused]] bool is_local ) { auto const& state = *msg->state; @@ -201,7 +201,7 @@ bool State::testReadyPutData(TagType const& tag) { /*static*/ void State::defaultPutHandlerFn( StateMessage* msg, RDMA_PtrType in_ptr, ByteType req_num_bytes, - ByteType req_offset, TagType tag, bool is_local + ByteType req_offset, TagType tag, [[maybe_unused]] bool is_local ) { auto const& state = *msg->state; diff --git a/src/vt/rdmahandle/handle.index.impl.h b/src/vt/rdmahandle/handle.index.impl.h index 1fbf6072c7..73ed0ad103 100644 --- a/src/vt/rdmahandle/handle.index.impl.h +++ b/src/vt/rdmahandle/handle.index.impl.h @@ -103,7 +103,7 @@ void Handle< template void Handle< T,E,I,typename std::enable_if_t::value> ->::lock(Lock l, I const& index) { +>::lock([[maybe_unused]] Lock l, [[maybe_unused]] I const& index) { //@todo: implement this } @@ -141,7 +141,7 @@ template void Handle< T,E,I,typename std::enable_if_t::value> >::get( - I const& index, std::size_t len, int offset, Lock l + I const& index, std::size_t len, int offset, [[maybe_unused]] Lock l ) { auto proxy = vt::objgroup::proxy::Proxy>(proxy_); proxy.get()->rget(index, len, offset); diff --git a/src/vt/rdmahandle/handle.node.impl.h b/src/vt/rdmahandle/handle.node.impl.h index 702552a755..cc6a932eca 100644 --- a/src/vt/rdmahandle/handle.node.impl.h +++ b/src/vt/rdmahandle/handle.node.impl.h @@ -80,7 +80,7 @@ template void Handle< T,E,I,typename std::enable_if_t::value> >::get( - vt::NodeType node, std::size_t len, int offset, Lock l + vt::NodeType node, std::size_t len, int offset, [[maybe_unused]] Lock l ) { rget(node, len, offset); } diff --git a/src/vt/rdmahandle/holder.impl.h b/src/vt/rdmahandle/holder.impl.h index 9cf8057d8b..a324808283 100644 --- a/src/vt/rdmahandle/holder.impl.h +++ b/src/vt/rdmahandle/holder.impl.h @@ -53,8 +53,8 @@ namespace vt { namespace rdma { template template void Holder::addHandle( - HandleKey key, ElemType lin, Handle han, std::size_t in_count, - bool uniform_size + HandleKey key, [[maybe_unused]] ElemType lin, + Handle han, std::size_t in_count, bool uniform_size ) { handle_ = han; key_ = key; diff --git a/src/vt/rdmahandle/manager.impl.h b/src/vt/rdmahandle/manager.impl.h index d1fb92591c..4c48e7565d 100644 --- a/src/vt/rdmahandle/manager.impl.h +++ b/src/vt/rdmahandle/manager.impl.h @@ -153,7 +153,7 @@ HandleSet Manager::makeHandleSetCollectiveObjGroup( LookupT max_lookup, std::unordered_map const& map, bool dense_start_with_zero, - bool uniform_size + [[maybe_unused]] bool uniform_size ) { using LookupType = LookupT; using IndexType = typename HandleSet::IndexType; diff --git a/src/vt/runtime/component/base.h b/src/vt/runtime/component/base.h index 7ec0b13048..c6d03cf69f 100644 --- a/src/vt/runtime/component/base.h +++ b/src/vt/runtime/component/base.h @@ -103,7 +103,7 @@ struct BaseComponent : Diagnostic, Bufferable, Progressable { friend struct ComponentPack; template - void serialize(Serializer& s) {} + void serialize([[maybe_unused]] Serializer& s) {} }; }}} /* end namespace vt::runtime::component */ diff --git a/src/vt/runtime/component/component.h b/src/vt/runtime/component/component.h index 2a1a1b7d97..720f737349 100644 --- a/src/vt/runtime/component/component.h +++ b/src/vt/runtime/component/component.h @@ -154,7 +154,9 @@ struct Component : BaseComponent { * * \return no units processed */ - virtual int progress(TimeType current_time) override { return 0; } + virtual int progress([[maybe_unused]] TimeType current_time) override { + return 0; + } /** * \brief Empty default diagnostic dump state @@ -188,7 +190,7 @@ struct PollableComponent : Component { * * \return number of units processed---zero */ - virtual int progress(TimeType current_time) override { + virtual int progress([[maybe_unused]] TimeType current_time) override { vtAbort("PollableComponent should override the empty progress function"); return 0; } diff --git a/src/vt/runtime/component/component_dep.h b/src/vt/runtime/component/component_dep.h index 0a313ad94b..859781d94d 100644 --- a/src/vt/runtime/component/component_dep.h +++ b/src/vt/runtime/component/component_dep.h @@ -62,8 +62,7 @@ struct AddDep { template <> struct AddDep<> { - static void add(registry::AutoHandlerType t) { - } + static void add([[maybe_unused]] registry::AutoHandlerType t) { } }; struct ComponentRegistry { diff --git a/src/vt/runtime/component/component_pack.impl.h b/src/vt/runtime/component/component_pack.impl.h index dad871c922..43277ce94b 100644 --- a/src/vt/runtime/component/component_pack.impl.h +++ b/src/vt/runtime/component/component_pack.impl.h @@ -51,7 +51,9 @@ namespace vt { namespace runtime { namespace component { namespace { template -std::unique_ptr tupleConsImpl(Tuple&& tup, std::index_sequence seq) { +std::unique_ptr tupleConsImpl( + Tuple&& tup, [[maybe_unused]] std::index_sequence seq +) { return T::template staticInit(std::get(std::forward(tup))...); } diff --git a/src/vt/runtime/runtime.cc b/src/vt/runtime/runtime.cc index 51ace6b1c9..f8ad7f36d1 100644 --- a/src/vt/runtime/runtime.cc +++ b/src/vt/runtime/runtime.cc @@ -272,7 +272,7 @@ void Runtime::pauseForDebugger() { handleSignalFailure(); } -/*static*/ void Runtime::sigHandlerUsr1(int sig) { +/*static*/ void Runtime::sigHandlerUsr1([[maybe_unused]] int sig) { Runtime::sig_user_1_ = true; } @@ -583,8 +583,8 @@ void Runtime::abort(std::string const abort_str, ErrorCodeType const code) { } void Runtime::output( - std::string const abort_str, ErrorCodeType const code, bool error, - bool decorate, bool formatted + std::string const abort_str, [[maybe_unused]] ErrorCodeType const code, + bool error, bool decorate, bool formatted ) { auto node = theContext ? theContext->getNode() : -1; auto green = debug::green(); @@ -946,7 +946,7 @@ namespace { * \param comm the MPI communicator * \param errc pointer to the error code */ - void mpiErrorHandler(MPI_Comm *comm, int *errc, ...) { + void mpiErrorHandler([[maybe_unused]] MPI_Comm *comm, int *errc, ...) { int len = MPI_MAX_ERROR_STRING; char msg[MPI_MAX_ERROR_STRING]; MPI_Error_string(*errc, msg, &len); diff --git a/src/vt/runtime/runtime_diagnostics.cc b/src/vt/runtime/runtime_diagnostics.cc index fc03ef3b0a..683a081715 100644 --- a/src/vt/runtime/runtime_diagnostics.cc +++ b/src/vt/runtime/runtime_diagnostics.cc @@ -260,7 +260,8 @@ void Runtime::computeAndPrintDiagnostics() { } }, [&]( - std::string const& comp, component::detail::DiagnosticBase* diag, + [[maybe_unused]] std::string const& comp, + component::detail::DiagnosticBase* diag, component::DiagnosticErasedValue* str ) { table[table.cur_row()][1].set_cell_content_fg_color(fort::color::green); diff --git a/src/vt/scheduler/scheduler.impl.h b/src/vt/scheduler/scheduler.impl.h index c7834bbd4e..448f3977b7 100644 --- a/src/vt/scheduler/scheduler.impl.h +++ b/src/vt/scheduler/scheduler.impl.h @@ -138,7 +138,7 @@ void Scheduler::enqueue(RunT r) { } template -void Scheduler::enqueue(PriorityType priority, RunT r) { +void Scheduler::enqueue([[maybe_unused]] PriorityType priority, RunT r) { bool const is_term = false; # if vt_check_enabled(priorities) work_queue_.emplace(UnitType(is_term, std::move(r), priority)); diff --git a/src/vt/serialization/messaging/serialized_messenger.impl.h b/src/vt/serialization/messaging/serialized_messenger.impl.h index 5cd8a56cc6..4ad07a4265 100644 --- a/src/vt/serialization/messaging/serialized_messenger.impl.h +++ b/src/vt/serialization/messaging/serialized_messenger.impl.h @@ -431,7 +431,9 @@ template ); auto base_msg = user_msg.template to(); - return messaging::PendingSend(base_msg, [=](MsgPtr in) { + return messaging::PendingSend( + base_msg, [=]([[maybe_unused]] MsgPtr in + ) { bool const is_obj = HandlerManager::isHandlerObjGroup(typed_handler); if (is_obj) { objgroup::dispatchObjGroup( diff --git a/src/vt/termination/dijkstra-scholten/ds.cc b/src/vt/termination/dijkstra-scholten/ds.cc index a38c8c53f9..6a07a4e3e2 100644 --- a/src/vt/termination/dijkstra-scholten/ds.cc +++ b/src/vt/termination/dijkstra-scholten/ds.cc @@ -214,7 +214,8 @@ void TermDS::msgProcessed(NodeType predecessor, CountType count) { template void TermDS::needAck( - NodeType const predecessor, CountType const count + [[maybe_unused]] NodeType const predecessor, + [[maybe_unused]] CountType const count ) { vtAssertInfo( 5 && (C == processedSum - (ackedArbitrary + ackedParent)), diff --git a/src/vt/termination/termination.cc b/src/vt/termination/termination.cc index cd9517510c..d4255f8eb1 100644 --- a/src/vt/termination/termination.cc +++ b/src/vt/termination/termination.cc @@ -542,7 +542,9 @@ void TerminationDetector::startEpochGraphBuild() { } } -/*static*/ void TerminationDetector::hangCheckHandler(HangCheckMsg* msg) { +/*static*/ void TerminationDetector::hangCheckHandler( + [[maybe_unused]] HangCheckMsg* msg +) { fmt::print("{}:hangCheckHandler\n",theContext()->getNode()); theTerm()->hang_.activateEpoch(); } diff --git a/src/vt/topos/location/location.impl.h b/src/vt/topos/location/location.impl.h index d547a16b35..e839c9d812 100644 --- a/src/vt/topos/location/location.impl.h +++ b/src/vt/topos/location/location.impl.h @@ -258,8 +258,8 @@ void EntityLocationCoord::entityEmigrated( template void EntityLocationCoord::entityImmigrated( - EntityID const& id, NodeType const& home_node, NodeType const& from, - LocMsgActionType msg_action + EntityID const& id, NodeType const& home_node, + [[maybe_unused]] NodeType const& from, LocMsgActionType msg_action ) { // @todo: currently `from' is unused, but is passed to this method in case we // need it in the future diff --git a/src/vt/topos/mapping/dense/dense.impl.h b/src/vt/topos/mapping/dense/dense.impl.h index 3b8b43ee87..da1c030d75 100644 --- a/src/vt/topos/mapping/dense/dense.impl.h +++ b/src/vt/topos/mapping/dense/dense.impl.h @@ -75,7 +75,9 @@ NodeType defaultDenseIndexNDMap(IdxNDPtr idx, IdxNDPtr max, NodeType n // Default round robin mappings template -NodeType dense1DRoundRobinMap(Idx1DPtr idx, Idx1DPtr max, NodeType nx) { +NodeType dense1DRoundRobinMap( + Idx1DPtr idx, [[maybe_unused]] Idx1DPtr max, NodeType nx +) { return idx->x() % nx; } diff --git a/src/vt/trace/trace.cc b/src/vt/trace/trace.cc index 7d3b8331a1..833b20eb9a 100644 --- a/src/vt/trace/trace.cc +++ b/src/vt/trace/trace.cc @@ -486,7 +486,7 @@ TraceEventIDType Trace::messageCreationBcast( TraceEventIDType Trace::messageRecv( TraceEntryIDType const ep, TraceMsgLenType const len, - NodeType const from_node, TimeType const time + [[maybe_unused]] NodeType const from_node, TimeType const time ) { if (not checkDynamicRuntimeEnabled()) { return no_trace_event; diff --git a/src/vt/trace/trace_lite.cc b/src/vt/trace/trace_lite.cc index 035d3370e3..06d574c782 100644 --- a/src/vt/trace/trace_lite.cc +++ b/src/vt/trace/trace_lite.cc @@ -182,7 +182,7 @@ void TraceLite::finalizeStandalone() { } #endif -void TraceLite::setupNames(std::string const& in_prog_name) { +void TraceLite::setupNames([[maybe_unused]] std::string const& in_prog_name) { if (not theConfig()->vt_trace) { return; } @@ -714,7 +714,9 @@ void TraceLite::outputControlFile(std::ofstream& file) { } /*static*/ void TraceLite::outputHeader( - vt_gzFile* file, NodeType const node, TimeType const start) { + vt_gzFile* file, [[maybe_unused]] NodeType const node, + [[maybe_unused]] TimeType const start +) { gzFile gzfile = file->file_type; // Output header for projections file // '6' means COMPUTATION_BEGIN to Projections: this starts a trace @@ -723,7 +725,9 @@ void TraceLite::outputControlFile(std::ofstream& file) { } /*static*/ void TraceLite::outputFooter( - vt_gzFile* file, NodeType const node, TimeType const start) { + vt_gzFile* file, [[maybe_unused]] NodeType const node, + TimeType const start +) { gzFile gzfile = file->file_type; // Output footer for projections file, // '7' means COMPUTATION_END to Projections diff --git a/src/vt/trace/trace_log.h b/src/vt/trace/trace_log.h index 3447f2ab4c..1b8443f700 100644 --- a/src/vt/trace/trace_log.h +++ b/src/vt/trace/trace_log.h @@ -259,7 +259,7 @@ struct Log final { // User event Log( TimeType const in_time, TraceConstantsType const in_type, - std::string const& in_note, UserDataType in_data + std::string const& in_note, [[maybe_unused]] UserDataType in_data ) : time(in_time), type(in_type), data(Data::UserData{in_note, 0, 0, false}) { diff --git a/src/vt/utils/memory/memory_reporter.h b/src/vt/utils/memory/memory_reporter.h index ca7c0c84d0..88a41b8573 100644 --- a/src/vt/utils/memory/memory_reporter.h +++ b/src/vt/utils/memory/memory_reporter.h @@ -55,7 +55,7 @@ struct Reporter { virtual std::string getName() = 0; template - void serialize(Serializer& s) { } + void serialize([[maybe_unused]] Serializer& s) { } }; }}} /* end namespace vt::util::memory */ diff --git a/src/vt/vrt/collection/balance/baselb/baselb.cc b/src/vt/vrt/collection/balance/baselb/baselb.cc index 1d94f2ce69..4f19fc9648 100644 --- a/src/vt/vrt/collection/balance/baselb/baselb.cc +++ b/src/vt/vrt/collection/balance/baselb/baselb.cc @@ -93,7 +93,7 @@ LoadType BaseLB::loadMilli(LoadType const& load) { void BaseLB::importProcessorData( StatisticMapType const& in_stats, ElementCommType const& comm_in, - balance::DataMapType const& in_data_map + [[maybe_unused]] balance::DataMapType const& in_data_map ) { vt_debug_print( normal, lb, diff --git a/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc b/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc index 3252e65d6b..9eab2a25fe 100644 --- a/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc +++ b/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc @@ -405,7 +405,7 @@ void HierarchicalLB::startMigrations() { void HierarchicalLB::downTreeSend( NodeType const node, NodeType const from, ObjSampleType const& excess, - bool const final_child, std::size_t const& approx_size + bool const final_child, [[maybe_unused]] std::size_t const& approx_size ) { proxy[node].template send( from, excess, final_child @@ -460,7 +460,9 @@ void HierarchicalLB::lbTreeUpHandler(LBTreeUpMsg* msg) { ); } -std::size_t HierarchicalLB::getSize(ObjSampleType const& sample) { +std::size_t HierarchicalLB::getSize( + [[maybe_unused]] ObjSampleType const& sample +) { return 0; } diff --git a/src/vt/vrt/collection/balance/lb_common.h b/src/vt/vrt/collection/balance/lb_common.h index ed333c78aa..81fe9a4e13 100644 --- a/src/vt/vrt/collection/balance/lb_common.h +++ b/src/vt/vrt/collection/balance/lb_common.h @@ -147,7 +147,7 @@ struct ReassignmentMsg : vt::Message { { } template - void serialize(SerializerT& s) { + void serialize([[maybe_unused]] SerializerT& s) { vtAssert(false, "Must never be called"); } diff --git a/src/vt/vrt/collection/balance/model/load_model.h b/src/vt/vrt/collection/balance/model/load_model.h index 2bf24f68dc..b3e5111bfc 100644 --- a/src/vt/vrt/collection/balance/model/load_model.h +++ b/src/vt/vrt/collection/balance/model/load_model.h @@ -241,7 +241,9 @@ struct LoadModel * * \return How much computation time the object required */ - virtual LoadType getRawLoad(ElementIDStruct object, PhaseOffset when) const { + virtual LoadType getRawLoad( + [[maybe_unused]] ElementIDStruct object, [[maybe_unused]] PhaseOffset when + ) const { vtAbort( "LoadModel::getRawLoad() called on a model that does not implement it" ); @@ -261,7 +263,9 @@ struct LoadModel * * \return The user data associated with the object */ - virtual ElmUserDataType getUserData(ElementIDStruct object, PhaseOffset when) const { + virtual ElmUserDataType getUserData( + [[maybe_unused]] ElementIDStruct object, [[maybe_unused]] PhaseOffset when + ) const { vtAbort( "LoadModel::getUserData() called on a model that does not implement it" ); @@ -280,7 +284,9 @@ struct LoadModel * The `updateLoads` method must have been called before any call to * this. */ - virtual LoadType getModeledComm(ElementIDStruct object, PhaseOffset when) const { + virtual LoadType getModeledComm( + [[maybe_unused]] ElementIDStruct object, [[maybe_unused]] PhaseOffset when + ) const { return {}; } @@ -345,7 +351,7 @@ struct LoadModel virtual int getNumSubphases() const = 0; template - void serialize(Serializer& s) {} + void serialize([[maybe_unused]] Serializer& s) {} }; // struct LoadModel }}}} // namespaces diff --git a/src/vt/vrt/collection/balance/offlinelb/offlinelb.h b/src/vt/vrt/collection/balance/offlinelb/offlinelb.h index a986133898..0d46f6c102 100644 --- a/src/vt/vrt/collection/balance/offlinelb/offlinelb.h +++ b/src/vt/vrt/collection/balance/offlinelb/offlinelb.h @@ -62,7 +62,7 @@ struct OfflineLB : BaseLB { void init(objgroup::proxy::Proxy in_proxy); void runLB(LoadType) override; - void inputParams(balance::ConfigEntry* config) override { } + void inputParams([[maybe_unused]] balance::ConfigEntry* config) override { } static std::unordered_map getInputKeysWithHelp() { return std::unordered_map{}; diff --git a/src/vt/vrt/collection/balance/rotatelb/rotatelb.cc b/src/vt/vrt/collection/balance/rotatelb/rotatelb.cc index bed2b2cda7..818618458e 100644 --- a/src/vt/vrt/collection/balance/rotatelb/rotatelb.cc +++ b/src/vt/vrt/collection/balance/rotatelb/rotatelb.cc @@ -59,7 +59,7 @@ RotateLB::getInputKeysWithHelp() { return std::unordered_map{}; } -void RotateLB::inputParams(balance::ConfigEntry* config) { } +void RotateLB::inputParams([[maybe_unused]] balance::ConfigEntry* config) { } void RotateLB::runLB(LoadType) { auto const& this_node = theContext()->getNode(); diff --git a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc index 5ae5ce94e4..781aa527d0 100644 --- a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc +++ b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc @@ -1012,7 +1012,8 @@ std::vector TemperedLB::makeSufficientlyUnderloaded( TemperedLB::ElementLoadType::iterator TemperedLB::selectObject( - LoadType size, ElementLoadType& load, std::set const& available + [[maybe_unused]] LoadType size, ElementLoadType& load, + std::set const& available ) { if (available.size() == 0) { return load.end(); diff --git a/src/vt/vrt/collection/balance/workload_replay.cc b/src/vt/vrt/collection/balance/workload_replay.cc index 91433e5c4b..7d6f8e145b 100644 --- a/src/vt/vrt/collection/balance/workload_replay.cc +++ b/src/vt/vrt/collection/balance/workload_replay.cc @@ -289,7 +289,7 @@ WorkloadDataMigrator::construct(std::shared_ptr model_base) { void WorkloadDataMigrator::runLB(LoadType) { } -void WorkloadDataMigrator::inputParams(ConfigEntry* spec) { } +void WorkloadDataMigrator::inputParams([[maybe_unused]] ConfigEntry* spec) { } std::unordered_map WorkloadDataMigrator::getInputKeysWithHelp() { diff --git a/src/vt/vrt/collection/manager.impl.h b/src/vt/vrt/collection/manager.impl.h index bf1ecd151e..6864393984 100644 --- a/src/vt/vrt/collection/manager.impl.h +++ b/src/vt/vrt/collection/manager.impl.h @@ -252,7 +252,7 @@ template "broadcast apply: size={}\n", elm_holder->numElements() ); elm_holder->foreach([col_msg, msg, handler]( - IndexT const& idx, Indexable* base + [[maybe_unused]] IndexT const& idx, Indexable* base ) { vtAssert(base != nullptr, "Must be valid pointer"); @@ -446,7 +446,9 @@ void CollectionManager::invokeCollective( auto elm_holder = findElmHolder(untyped_proxy); auto const this_node = theContext()->getNode(); - elm_holder->foreach([&](IndexType const& idx, Indexable* ptr) { + elm_holder->foreach( + [&]([[maybe_unused]] IndexType const& idx, Indexable* ptr + ) { // be careful not to forward here as we are reusing args runnable::makeRunnableVoid(false, uninitialized_handler, this_node) .withCollection(ptr) @@ -960,7 +962,8 @@ messaging::PendingSend CollectionManager::reduceMsg( template *f> messaging::PendingSend CollectionManager::reduceMsgExpr( CollectionProxyWrapType const& proxy, - MsgT *const msg, ReduceIdxFuncType expr_fn, + MsgT *const msg, + [[maybe_unused]] ReduceIdxFuncType expr_fn, ReduceStamp stamp, typename ColT::IndexType const& idx ) { auto const mapped_node = getMappedNode(proxy, idx); @@ -1506,7 +1509,8 @@ ColT* CollectionManager::tryGetLocalPtr( template ModifierToken CollectionManager::beginModification( - CollectionProxyWrapType const& proxy, std::string const& label + [[maybe_unused]] CollectionProxyWrapType const& proxy, + std::string const& label ) { auto epoch = theTerm()->makeEpochCollective(label); @@ -2191,7 +2195,8 @@ template template void CollectionManager::restoreFromFileInPlace( - CollectionProxyWrapType proxy, typename ColT::IndexType range, + CollectionProxyWrapType proxy, + [[maybe_unused]] typename ColT::IndexType range, std::string const& file_base ) { using IndexType = typename ColT::IndexType; @@ -2308,7 +2313,9 @@ messaging::PendingSend CollectionManager::schedule( MsgT msg, bool execute_now, EpochType cur_epoch, ActionType action ) { theTerm()->produce(cur_epoch); - return messaging::PendingSend(msg, [=](MsgVirtualPtr inner_msg){ + return messaging::PendingSend( + msg, [=]([[maybe_unused]] MsgVirtualPtr inner_msg + ){ auto fn = [=]{ theMsg()->pushEpoch(cur_epoch); action(); diff --git a/src/vt/vrt/context/context_vrt.h b/src/vt/vrt/context/context_vrt.h index ea7fc29cc4..1fe80eb2fa 100644 --- a/src/vt/vrt/context/context_vrt.h +++ b/src/vt/vrt/context/context_vrt.h @@ -54,12 +54,12 @@ namespace vt { namespace vrt { struct VirtualContext : VrtBase { VirtualContext() = default; - VirtualContext(bool const in_is_main) { } + VirtualContext([[maybe_unused]] bool const in_is_main) { } friend struct VirtualContextAttorney; template - void serialize(Serializer& s) {} + void serialize([[maybe_unused]] Serializer& s) {} }; diff --git a/tests/unit/active/test_active_send.cc b/tests/unit/active/test_active_send.cc index f42c276f3d..cd2dc33e6d 100644 --- a/tests/unit/active/test_active_send.cc +++ b/tests/unit/active/test_active_send.cc @@ -242,7 +242,7 @@ TEST_F(TestActiveSend, test_active_message_serialization) { EXPECT_EQ(handler_count, num_msg_sent); } -void testPropertiesHandler(int a, double b) { +void testPropertiesHandler([[maybe_unused]] int a, [[maybe_unused]] double b) { // do nothing } diff --git a/tests/unit/active/test_async_op_mpi.cc b/tests/unit/active/test_async_op_mpi.cc index dff5e04e59..1e004a584b 100644 --- a/tests/unit/active/test_async_op_mpi.cc +++ b/tests/unit/active/test_async_op_mpi.cc @@ -59,7 +59,7 @@ using MyMsg = Message; struct MyObjGroup { - void handler(MyMsg* msg) { + void handler([[maybe_unused]] MyMsg* msg) { auto const this_node = theContext()->getNode(); auto const num_nodes = theContext()->getNumNodes(); auto const to_node = (this_node + 1) % num_nodes; diff --git a/tests/unit/active/test_async_op_threads.cc b/tests/unit/active/test_async_op_threads.cc index 0faf97c982..6d1dc9ebbf 100644 --- a/tests/unit/active/test_async_op_threads.cc +++ b/tests/unit/active/test_async_op_threads.cc @@ -62,7 +62,7 @@ struct MyCol : vt::Collection { using MyMsg = vt::CollectionMessage; - void handler(MyMsg* msg) { + void handler([[maybe_unused]] MyMsg* msg) { auto const this_node = theContext()->getNode(); auto const num_nodes = theContext()->getNumNodes(); auto const to_node = (this_node + 1) % num_nodes; @@ -130,7 +130,7 @@ struct MyCol : vt::Collection { theMsg()->popEpoch(cur_ep); } - void handlerInvoke(MyMsg* msg) { + void handlerInvoke([[maybe_unused]] MyMsg* msg) { auto const this_node = theContext()->getNode(); auto const num_nodes = theContext()->getNumNodes(); auto const to_node = (this_node + 1) % num_nodes; diff --git a/tests/unit/active/test_pending_send.cc b/tests/unit/active/test_pending_send.cc index 6d18bcd834..fcf1118221 100644 --- a/tests/unit/active/test_pending_send.cc +++ b/tests/unit/active/test_pending_send.cc @@ -60,7 +60,7 @@ struct TestPendingSend : TestParallelHarness { vt::NodeType sender = uninitialized_destination; }; static void handlerPong(TestMsg*) { delivered = true; } - static void handlerPing(TestMsg* in_msg) { + static void handlerPing([[maybe_unused]] TestMsg* in_msg) { auto const this_node = theContext()->getNode(); auto const num_nodes = theContext()->getNumNodes(); auto prev = this_node - 1 >= 0 ? this_node - 1 : num_nodes - 1; diff --git a/tests/unit/collection/test_checkpoint.extended.cc b/tests/unit/collection/test_checkpoint.extended.cc index ff76861d5f..5f7b7c4666 100644 --- a/tests/unit/collection/test_checkpoint.extended.cc +++ b/tests/unit/collection/test_checkpoint.extended.cc @@ -389,7 +389,10 @@ TEST_F(TestCheckpoint, test_checkpoint_in_place_3) { // 2. Checkpoint the collection // 3. Restore the collection and validate it -vt::NodeType map(vt::Index3D* idx, vt::Index3D* max_idx, vt::NodeType num_nodes) { +vt::NodeType map( + vt::Index3D* idx, [[maybe_unused]] vt::Index3D* max_idx, + vt::NodeType num_nodes +) { return (idx->x() % (num_nodes-1))+1; } diff --git a/tests/unit/collection/test_collection_common.h b/tests/unit/collection/test_collection_common.h index e14553966d..84448a69cb 100644 --- a/tests/unit/collection/test_collection_common.h +++ b/tests/unit/collection/test_collection_common.h @@ -114,8 +114,8 @@ static test_data::C magic_C_t_ = test_data::C{"test123",34}; template struct ConstructTuple { static Tuple construct() { return Tuple{}; } - static void print(Tuple t) { } - static void isCorrect(Tuple t) { } + static void print([[maybe_unused]] Tuple t) { } + static void isCorrect([[maybe_unused]] Tuple t) { } }; #define CONSTRUCT_TUPLE_TYPE(PARAM_TYPE,PARAM_NAME) \ diff --git a/tests/unit/collection/test_collection_construct_common.h b/tests/unit/collection/test_collection_construct_common.h index f27a59b0c5..eaa6bb4179 100644 --- a/tests/unit/collection/test_collection_construct_common.h +++ b/tests/unit/collection/test_collection_construct_common.h @@ -71,7 +71,9 @@ struct ConstructHandlers { typename CollectionT, typename MessageT = typename CollectionT::MsgType > - static void handler(CollectionT* col, MessageT* msg) { + static void handler( + [[maybe_unused]] CollectionT* col, [[maybe_unused]] MessageT* msg + ) { // fmt::print( // "{}: constructed TestCol: idx.x()={}\n", // theContext()->getNode(), col->getIndex().x(), print_ptr(col) @@ -98,7 +100,7 @@ struct ConstructParams { IndexType idx, std::string const& label ) { return theCollection()->constructCollective( - idx, [=](IndexType my_idx) { + idx, [=]([[maybe_unused]] IndexType my_idx) { return std::make_unique(); }, label ); diff --git a/tests/unit/collection/test_collection_group.extended.cc b/tests/unit/collection/test_collection_group.extended.cc index cb5c8e26dc..d85ca5282d 100644 --- a/tests/unit/collection/test_collection_group.extended.cc +++ b/tests/unit/collection/test_collection_group.extended.cc @@ -91,7 +91,10 @@ struct ColA : Collection { bool reduce_test = false; }; -void colHandler(typename ColA::TestDataMsg::CollectionType* type, ColA::TestDataMsg*) { +void colHandler( + [[maybe_unused]] typename ColA::TestDataMsg::CollectionType* type, + ColA::TestDataMsg* +) { --elem_counter; } @@ -121,7 +124,7 @@ TEST_F(TestCollectionGroup, test_collection_group_2) { auto const range = Index1D(8); auto const proxy = theCollection()->constructCollective( - range, [](vt::Index1D idx) { + range, []([[maybe_unused]] vt::Index1D idx) { ++elem_counter; return std::make_unique(); }, "test_collection_group_2" @@ -141,7 +144,7 @@ TEST_F(TestCollectionGroup, test_collection_group_3) { auto const range = Index1D(8); auto const proxy = theCollection()->constructCollective( - range, [](vt::Index1D idx) { + range, []([[maybe_unused]] vt::Index1D idx) { ++elem_counter; return std::make_unique(); }, "test_collection_group_3" diff --git a/tests/unit/collection/test_index_types.extended.cc b/tests/unit/collection/test_index_types.extended.cc index 38ac039f18..838cb905f7 100644 --- a/tests/unit/collection/test_index_types.extended.cc +++ b/tests/unit/collection/test_index_types.extended.cc @@ -83,7 +83,7 @@ struct ColMsg : CollectionMessage> { }; template -void TestCol::handler(ColMsg* msg) {} +void TestCol::handler([[maybe_unused]] ColMsg* msg) {} } /* end namespace test_index_types_ */ diff --git a/tests/unit/collection/test_insert.extended.cc b/tests/unit/collection/test_insert.extended.cc index 7c104b38cb..05dff7b715 100644 --- a/tests/unit/collection/test_insert.extended.cc +++ b/tests/unit/collection/test_insert.extended.cc @@ -78,7 +78,7 @@ struct InsertTest : Collection { void work(WorkMsg* msg); }; -void InsertTest::work(WorkMsg* msg) { +void InsertTest::work([[maybe_unused]] WorkMsg* msg) { ::fmt::print("node={}: num_work={}, idx={}\n", theContext()->getNode(), num_work, getIndex()); num_work++; } diff --git a/tests/unit/collection/test_list_insert.cc b/tests/unit/collection/test_list_insert.cc index 7dd0504940..c7aa4720a8 100644 --- a/tests/unit/collection/test_list_insert.cc +++ b/tests/unit/collection/test_list_insert.cc @@ -76,7 +76,7 @@ struct ListInsertTest : Collection { void work(WorkMsg* msg); }; -void ListInsertTest::work(WorkMsg* msg) { +void ListInsertTest::work([[maybe_unused]] WorkMsg* msg) { vt_print(gen, "num_work={}, idx={}\n", num_work, getIndex()); num_work++; } @@ -111,7 +111,7 @@ using ColProxyTypeNDC = CollectionIndexProxy { ).getProxy(); } - vt::NodeType map(IndexT* idx, int ndim, vt::NodeType num_nodes) override { + vt::NodeType map( + IndexT* idx, [[maybe_unused]] int ndim, vt::NodeType num_nodes + ) override { return idx->x() % num_nodes; } }; diff --git a/tests/unit/collection/test_query_context.cc b/tests/unit/collection/test_query_context.cc index 86470e0bde..42a6e6160b 100644 --- a/tests/unit/collection/test_query_context.cc +++ b/tests/unit/collection/test_query_context.cc @@ -63,7 +63,7 @@ struct QueryTest : Collection { struct WorkMsg : CollectionMessage {}; -void QueryTest::work(WorkMsg* msg) { +void QueryTest::work([[maybe_unused]] WorkMsg* msg) { auto idx = vt::theCollection()->queryIndexContext(); auto proxy = vt::theCollection()->queryProxyContext(); EXPECT_EQ(*idx, this->getIndex()); diff --git a/tests/unit/collection/test_reduce_collection_race.cc b/tests/unit/collection/test_reduce_collection_race.cc index ad5cbef589..02e19760a1 100644 --- a/tests/unit/collection/test_reduce_collection_race.cc +++ b/tests/unit/collection/test_reduce_collection_race.cc @@ -52,7 +52,7 @@ struct MyCol : vt::Collection {}; static int multiplier = 0; -static void reduceTarget(MyCol* col, int val) { +static void reduceTarget([[maybe_unused]] MyCol* col, int val) { auto const num_nodes = theContext()->getNumNodes(); auto const num_elems = num_nodes * multiplier; fmt::print("reduce finished: val={}, num_elems={}\n", val, num_elems); diff --git a/tests/unit/collection/test_storage.cc b/tests/unit/collection/test_storage.cc index b707501b5c..356629b3a1 100644 --- a/tests/unit/collection/test_storage.cc +++ b/tests/unit/collection/test_storage.cc @@ -79,7 +79,7 @@ struct TestCol : Collection { testHandlerValues(msg); } - void testHandlerValues(TestMsg* msg) { + void testHandlerValues([[maybe_unused]] TestMsg* msg) { EXPECT_EQ(this->valGet("hello"), this->getIndex().x()); std::vector in_vec{5,4,1,7,3}; diff --git a/tests/unit/collectives/test_collectives_reduce.cc b/tests/unit/collectives/test_collectives_reduce.cc index bd5447ac16..863f68a449 100644 --- a/tests/unit/collectives/test_collectives_reduce.cc +++ b/tests/unit/collectives/test_collectives_reduce.cc @@ -81,7 +81,10 @@ struct Hello : vt::Collection { } }; -vt::NodeType map(vt::Index1D* idx, vt::Index1D* max_idx, vt::NodeType num_nodes) { +vt::NodeType map( + vt::Index1D* idx, [[maybe_unused]] vt::Index1D* max_idx, + vt::NodeType num_nodes +) { return (idx->x() % (num_nodes-1))+1; } diff --git a/tests/unit/group/test_group.cc b/tests/unit/group/test_group.cc index d3c425ae03..3e968fb57e 100644 --- a/tests/unit/group/test_group.cc +++ b/tests/unit/group/test_group.cc @@ -67,7 +67,7 @@ struct TestGroup : TestParallelHarness { SET_MIN_NUM_NODES_CONSTRAINT(2); } - static void groupHandler(TestMsg* msg) { + static void groupHandler([[maybe_unused]] TestMsg* msg) { auto const& this_node = theContext()->getNode(); num_recv++; fmt::print("{}: groupHandler: num_recv={}\n", this_node, num_recv); diff --git a/tests/unit/group/test_group.extended.cc b/tests/unit/group/test_group.extended.cc index a222164da0..628ddd2ab6 100644 --- a/tests/unit/group/test_group.extended.cc +++ b/tests/unit/group/test_group.extended.cc @@ -51,7 +51,7 @@ namespace vt { namespace tests { namespace unit { struct MySimpleMsg : ::vt::Message { }; -static void msgHandlerGroup(MySimpleMsg* msg) { +static void msgHandlerGroup([[maybe_unused]] MySimpleMsg* msg) { auto const cur_node = ::vt::theContext()->getNode(); vtAssert(cur_node % 2 == 0, "This handler should only execute on even nodes"); diff --git a/tests/unit/lb/test_lb_data_comm.cc b/tests/unit/lb/test_lb_data_comm.cc index fbc2b42d34..b0ab4e6c69 100644 --- a/tests/unit/lb/test_lb_data_comm.cc +++ b/tests/unit/lb/test_lb_data_comm.cc @@ -123,7 +123,7 @@ struct ColProxyMsg : vt::Message { }; struct ProxyMsg; struct MyObj { - void dummyHandler(MyObjMsg* msg) {} + void dummyHandler([[maybe_unused]] MyObjMsg* msg) {} void simulateObjGroupColTSends(ColProxyMsg* msg); void simulateObjGroupObjGroupSends(ProxyMsg* msg); void simulateObjGroupHandlerSends(MyMsg* msg); @@ -134,7 +134,7 @@ struct ProxyMsg : vt::CollectionMessage { ProxyType obj_proxy; }; -void handler2(MyCol* col, MyMsg*) {} +void handler2([[maybe_unused]] MyCol* col, MyMsg*) {} void MyObj::simulateObjGroupColTSends(ColProxyMsg* msg) { auto proxy = msg->proxy; @@ -171,7 +171,9 @@ void simulateColTColTSends(MyCol* col) { } } -void simulateColTObjGroupSends(MyCol* col, ProxyMsg* msg) { +void simulateColTObjGroupSends( + [[maybe_unused]] MyCol* col, ProxyMsg* msg +) { auto obj_proxy = msg->obj_proxy; auto this_node = theContext()->getNode(); auto num_nodes = theContext()->getNumNodes(); @@ -181,9 +183,9 @@ void simulateColTObjGroupSends(MyCol* col, ProxyMsg* msg) { } } -void bareDummyHandler(MyObjMsg* msg) {} +void bareDummyHandler([[maybe_unused]] MyObjMsg* msg) {} -void simulateColTHandlerSends(MyCol* col) { +void simulateColTHandlerSends([[maybe_unused]] MyCol* col) { auto this_node = theContext()->getNode(); auto num_nodes = theContext()->getNumNodes(); auto next = (this_node + 1) % num_nodes; @@ -193,7 +195,7 @@ void simulateColTHandlerSends(MyCol* col) { } } -void MyObj::simulateObjGroupHandlerSends(MyMsg* msg) { +void MyObj::simulateObjGroupHandlerSends([[maybe_unused]] MyMsg* msg) { auto this_node = theContext()->getNode(); auto num_nodes = theContext()->getNumNodes(); auto next = (this_node + 1) % num_nodes; @@ -229,7 +231,7 @@ void simulateHandlerObjGroupSends(ProxyMsg* msg) { } } -void simulateHandlerHandlerSends(MyMsg* msg) { +void simulateHandlerHandlerSends([[maybe_unused]] MyMsg* msg) { auto this_node = theContext()->getNode(); auto num_nodes = theContext()->getNumNodes(); auto next = (this_node + 1) % num_nodes; diff --git a/tests/unit/location/test_hops.extended.cc b/tests/unit/location/test_hops.extended.cc index 532c5c576a..4f12c7d89a 100644 --- a/tests/unit/location/test_hops.extended.cc +++ b/tests/unit/location/test_hops.extended.cc @@ -118,9 +118,7 @@ struct TestColl : Collection { EXPECT_TRUE(not m->do_check_ or m->getHops() <= 1); } - void cont(TestMsg* m) { - - } + void cont([[maybe_unused]] TestMsg* m) { } template void serialize(SerializerT& s) { diff --git a/tests/unit/location/test_location.cc b/tests/unit/location/test_location.cc index 190cd2e50d..ec0af5af85 100644 --- a/tests/unit/location/test_location.cc +++ b/tests/unit/location/test_location.cc @@ -135,7 +135,9 @@ TEST_F(TestLocation, test_unregister_multiple_entities) /* NOLINT */ { for (auto i = 0; i < nb_nodes; ++i) { // The entity can be located on the node where it has been registered vt::theLocMan()->virtual_loc->getLocation( - location::default_entity + i, i, [](vt::NodeType node) { + location::default_entity + i, i, + []([[maybe_unused]] vt::NodeType node + ) { // This lambda should not be executed if the unregisterEntity works // correctly FAIL() << "entity should have been yet unregistered"; @@ -366,7 +368,8 @@ TYPED_TEST_P(TestLocationRoute, test_entity_cache_hits) /* NOLINT */ { // register entity and count received messages if (my_node == home) { vt::theLocMan()->virtual_loc->registerEntity( - entity, my_node, [&](vt::BaseMessage* msg){ nb_received++; } + entity, my_node, + [&]([[maybe_unused]] vt::BaseMessage* msg){ nb_received++; } ); } @@ -410,7 +413,7 @@ TYPED_TEST_P(TestLocationRoute, test_entity_cache_migrated_entity) /* NOLINT */{ // receive migrated entity: register it and keep in cache vt::theLocMan()->virtual_loc->entityImmigrated( entity, home, my_node, - [entity, &nb_received](vt::BaseMessage* in_msg) { + [entity, &nb_received]([[maybe_unused]] vt::BaseMessage* in_msg) { vt_debug_print( normal, location, "TestLocationRoute: message arrived to me for a migrated " diff --git a/tests/unit/memory/test_memory_active.cc b/tests/unit/memory/test_memory_active.cc index 53ce419e4a..f2de254f24 100644 --- a/tests/unit/memory/test_memory_active.cc +++ b/tests/unit/memory/test_memory_active.cc @@ -63,7 +63,7 @@ struct TestMemoryActiveMsg { template struct TestMemoryActive : TestParallelHarness { - static void test_handler(MsgT* msg) { } + static void test_handler([[maybe_unused]] MsgT* msg) { } }; static constexpr int32_t const num_msg_sent = 5; diff --git a/tests/unit/memory/test_memory_lifetime.cc b/tests/unit/memory/test_memory_lifetime.cc index b883d05fc4..31a8db3642 100644 --- a/tests/unit/memory/test_memory_lifetime.cc +++ b/tests/unit/memory/test_memory_lifetime.cc @@ -64,8 +64,10 @@ struct SerialTrackMsg : ::vt::Message { vt_msg_serialize_required(); SerialTrackMsg() { ++alloc_count; } - SerialTrackMsg(SerialTrackMsg const& other) { ++alloc_count; } - SerialTrackMsg(SerialTrackMsg&& other) { ++alloc_count; } + SerialTrackMsg([[maybe_unused]] SerialTrackMsg const& other) { + ++alloc_count; + } + SerialTrackMsg([[maybe_unused]] SerialTrackMsg&& other) { ++alloc_count; } template void serialize(Serializer& s) { @@ -99,11 +101,11 @@ struct TestMemoryLifetime : TestParallelHarness { SET_MIN_NUM_NODES_CONSTRAINT(2); } - static void serialHan(SerialTestMsg* msg) { + static void serialHan([[maybe_unused]] SerialTestMsg* msg) { local_count++; } - static void normalHan(NormalTestMsg* msg) { + static void normalHan([[maybe_unused]] NormalTestMsg* msg) { local_count++; //fmt::print("{}: normalHan num={}\n", theContext()->getNode(), local_count); } @@ -221,7 +223,8 @@ static void callbackHan(CallbackMsg* msg) { TEST_F(TestMemoryLifetime, test_active_send_callback_lifetime_1) { auto cb = theCB()->makeFunc( - vt::pipe::LifetimeEnum::Indefinite, [](NormalTestMsg* msg){ } + vt::pipe::LifetimeEnum::Indefinite, + []([[maybe_unused]] NormalTestMsg* msg){ } ); for (int i = 0; i < num_msgs_sent; i++) { @@ -252,7 +255,8 @@ static void callbackHan(CallbackMsg* msg) { TEST_F(TestMemoryLifetime, test_active_serial_callback_lifetime_1) { auto cb = theCB()->makeFunc( - vt::pipe::LifetimeEnum::Indefinite, [](SerialTestMsg* msg){ } + vt::pipe::LifetimeEnum::Indefinite, + []([[maybe_unused]] SerialTestMsg* msg){ } ); for (int i = 0; i < num_msgs_sent; i++) { diff --git a/tests/unit/pipe/test_signal_cleanup.cc b/tests/unit/pipe/test_signal_cleanup.cc index 01bf454ac6..c9b71e02cb 100644 --- a/tests/unit/pipe/test_signal_cleanup.cc +++ b/tests/unit/pipe/test_signal_cleanup.cc @@ -80,7 +80,7 @@ TEST_F(TestSignalCleanup, test_signal_cleanup_3) { if (this_node == 0) { auto cb = theCB()->makeFunc( - vt::pipe::LifetimeEnum::Once, [&c1](DataMsg* msg){ + vt::pipe::LifetimeEnum::Once, [&c1]([[maybe_unused]] DataMsg* msg){ c1++; fmt::print("called A"); } @@ -107,7 +107,7 @@ TEST_F(TestSignalCleanup, test_signal_cleanup_3) { // if (this_node == 0) { auto cb = theCB()->makeFunc( - vt::pipe::LifetimeEnum::Once, [&c2](DataMsg* msg){ + vt::pipe::LifetimeEnum::Once, [&c2]([[maybe_unused]] DataMsg* msg){ c2++; fmt::print("called B"); } diff --git a/tests/unit/pool/test_pool.cc b/tests/unit/pool/test_pool.cc index 6d9fd39316..875f5b8048 100644 --- a/tests/unit/pool/test_pool.cc +++ b/tests/unit/pool/test_pool.cc @@ -69,7 +69,7 @@ struct TestPool : TestParallelHarness { }; template -void TestPool::testPoolFun(TestMsg* prev_msg) { +void TestPool::testPoolFun([[maybe_unused]] TestMsg* prev_msg) { #if DEBUG_TEST_HARNESS_PRINT fmt::print("testPoolFun: num_bytes={}\n", num_bytes); #endif @@ -81,7 +81,9 @@ void TestPool::testPoolFun(TestMsg* prev_msg) { } template <> -void TestPool::testPoolFun(TestMsg* msg) { } +void TestPool::testPoolFun( + [[maybe_unused]] TestMsg* msg +) { } TEST_F(TestPool, pool_message_alloc) { using namespace vt; diff --git a/tests/unit/pool/test_pool_message_sizes.cc b/tests/unit/pool/test_pool_message_sizes.cc index 9ea981e079..6fe3b4b7c6 100644 --- a/tests/unit/pool/test_pool_message_sizes.cc +++ b/tests/unit/pool/test_pool_message_sizes.cc @@ -87,7 +87,9 @@ struct TestPoolMessageSizes : TestParallelHarness { /*static*/ int TestPoolMessageSizes::count; template -void TestPoolMessageSizes::testPoolFun(TestMsg* prev_msg) { +void TestPoolMessageSizes::testPoolFun( + [[maybe_unused]] TestMsg* prev_msg +) { auto const& this_node = theContext()->getNode(); #if DEBUG_TEST_HARNESS_PRINT @@ -114,7 +116,9 @@ void TestPoolMessageSizes::testPoolFun(TestMsg* prev_msg) { } template <> -void TestPoolMessageSizes::testPoolFun(TestMsg* msg) { } +void TestPoolMessageSizes::testPoolFun( + [[maybe_unused]] TestMsg* msg +) { } TEST_F(TestPoolMessageSizes, pool_message_sizes_alloc) { SET_NUM_NODES_CONSTRAINT(2); diff --git a/tests/unit/rdma/test_rdma_common.h b/tests/unit/rdma/test_rdma_common.h index 54a42afa57..bb702753fc 100644 --- a/tests/unit/rdma/test_rdma_common.h +++ b/tests/unit/rdma/test_rdma_common.h @@ -55,7 +55,7 @@ struct UpdateData { static void init( HandleT& handle, int space, std::size_t size, vt::NodeType rank ) { - handle.modifyExclusive([=](T* val, std::size_t count){ + handle.modifyExclusive([=](T* val, [[maybe_unused]] std::size_t count){ setMem(val, space, size, rank, 0); }); } diff --git a/tests/unit/runtime/test_component_construction.cc b/tests/unit/runtime/test_component_construction.cc index c66d439e76..2b6fcb6384 100644 --- a/tests/unit/runtime/test_component_construction.cc +++ b/tests/unit/runtime/test_component_construction.cc @@ -89,7 +89,9 @@ struct MyComponentArgs : runtime::component::Component { explicit MyComponentArgs(Tag) {} public: struct MyTag {}; - static std::unique_ptr construct(int a, int& b, MyTag&& tag) { + static std::unique_ptr construct( + [[maybe_unused]] int a, int& b, [[maybe_unused]] MyTag&& tag + ) { b = 20; return std::make_unique(Tag{}); } diff --git a/tests/unit/runtime/test_mpi_access_guards.cc b/tests/unit/runtime/test_mpi_access_guards.cc index 4f63a80427..0d1c3ce644 100644 --- a/tests/unit/runtime/test_mpi_access_guards.cc +++ b/tests/unit/runtime/test_mpi_access_guards.cc @@ -72,7 +72,7 @@ static void attempt_mpi_access() { } } -static void message_handler(DummyMsg* msg) { +static void message_handler([[maybe_unused]] DummyMsg* msg) { if (expected_to_fail_on_mpi_access) { ASSERT_THROW(attempt_mpi_access(), std::runtime_error) << "MPI functions should not be used inside user code invoked from VT handlers"; diff --git a/tests/unit/serialization/test_serialize_messenger_virtual.extended.cc b/tests/unit/serialization/test_serialize_messenger_virtual.extended.cc index fa0040c4be..05eb2243bc 100644 --- a/tests/unit/serialization/test_serialize_messenger_virtual.extended.cc +++ b/tests/unit/serialization/test_serialize_messenger_virtual.extended.cc @@ -94,7 +94,7 @@ struct DataMsg : vt::vrt::VirtualMessage { struct TestSerialMessengerVirtual : TestParallelHarness { using TestMsg = TestStaticBytesShortMsg<4>; - static void testHandler(TestCtx* ctx, DataMsg* msg) { + static void testHandler([[maybe_unused]] TestCtx* ctx, DataMsg* msg) { msg->check(); } }; diff --git a/tests/unit/termination/test_epoch_guard.cc b/tests/unit/termination/test_epoch_guard.cc index e58360898e..285da2b5ec 100644 --- a/tests/unit/termination/test_epoch_guard.cc +++ b/tests/unit/termination/test_epoch_guard.cc @@ -58,7 +58,7 @@ struct TestEpochGuard : TestParallelHarness { using TestMsg = EpochMessage; static EpochType ep; - static void test_guarded_msg_recv(TestMsg *msg) + static void test_guarded_msg_recv([[maybe_unused]] TestMsg *msg) { EXPECT_EQ(theMsg()->getEpoch(), ep); } diff --git a/tests/unit/termination/test_term_chaining.cc b/tests/unit/termination/test_term_chaining.cc index c7cdf672f4..b938bd0bcd 100644 --- a/tests/unit/termination/test_term_chaining.cc +++ b/tests/unit/termination/test_term_chaining.cc @@ -72,7 +72,7 @@ struct TestTermChaining : TestParallelHarness { int num = 0; }; - static void test_handler_reflector(TestMsg* msg) { + static void test_handler_reflector([[maybe_unused]] TestMsg* msg) { fmt::print("reflector run\n"); handler_count = 12; @@ -82,7 +82,7 @@ struct TestTermChaining : TestParallelHarness { theMsg()->sendMsg(0, msg2); } - static void test_handler_response(TestMsg* msg) { + static void test_handler_response([[maybe_unused]] TestMsg* msg) { fmt::print("response run\n"); EXPECT_EQ(theContext()->getNode(), 0); @@ -90,7 +90,7 @@ struct TestTermChaining : TestParallelHarness { handler_count++; } - static void test_handler_chainer(TestMsg* msg) { + static void test_handler_chainer([[maybe_unused]] TestMsg* msg) { fmt::print("chainer run\n"); EXPECT_EQ(handler_count, 12); @@ -99,7 +99,7 @@ struct TestTermChaining : TestParallelHarness { theMsg()->sendMsg(0, msg2); } - static void test_handler_chained(TestMsg* msg) { + static void test_handler_chained([[maybe_unused]] TestMsg* msg) { fmt::print("chained run\n"); EXPECT_EQ(theContext()->getNode(), 0); @@ -107,7 +107,7 @@ struct TestTermChaining : TestParallelHarness { handler_count = 4; } - static void test_handler_set(TestMsg* msg) { + static void test_handler_set([[maybe_unused]] TestMsg* msg) { handler_count = 1; } @@ -119,7 +119,7 @@ struct TestTermChaining : TestParallelHarness { handler_count = 2; } - static void test_handler_bcast(TestMsg* msg) { + static void test_handler_bcast([[maybe_unused]] TestMsg* msg) { static auto visited = 0; if (theContext()->getNode() == 0) { diff --git a/tests/unit/termination/test_term_cleanup.cc b/tests/unit/termination/test_term_cleanup.cc index 6e587d897f..1093056e28 100644 --- a/tests/unit/termination/test_term_cleanup.cc +++ b/tests/unit/termination/test_term_cleanup.cc @@ -57,7 +57,7 @@ using namespace vt::tests::unit; struct TestTermCleanup : TestParallelHarness { using TestMsgType = TestStaticBytesNormalMsg<64>; - static void handler(TestMsgType* msg) { + static void handler([[maybe_unused]] TestMsgType* msg) { //fmt::print("receive msg\n"); } }; diff --git a/tests/unit/termination/test_term_dep_send_chain.cc b/tests/unit/termination/test_term_dep_send_chain.cc index 232e6651de..bcf2268ee0 100644 --- a/tests/unit/termination/test_term_dep_send_chain.cc +++ b/tests/unit/termination/test_term_dep_send_chain.cc @@ -318,7 +318,9 @@ struct MyObjGroup { void makeColl(std::string const& label, NodeType num_nodes, int k) { auto range = vt::Index2D(static_cast(num_nodes),k); backend_proxy_ = vt::theCollection()->constructCollective( - range, [=](vt::Index2D idx) { return std::make_unique(num_nodes, k); }, + range, [=]([[maybe_unused]] vt::Index2D idx) { + return std::make_unique(num_nodes, k); + }, label ); @@ -517,7 +519,7 @@ struct PrintParam { struct MergeCol : vt::Collection { MergeCol() = default; - MergeCol(NodeType num, double off) : offset_( off ) { + MergeCol([[maybe_unused]] NodeType num, double off) : offset_( off ) { idx_ = getIndex(); } @@ -587,7 +589,7 @@ struct MergeObjGroup auto const node = theContext()->getNode(); auto range = vt::Index2D(static_cast(num_nodes),k); backend_proxy_ = vt::theCollection()->constructCollective( - range, [=](vt::Index2D idx) { + range, [=]([[maybe_unused]] vt::Index2D idx) { return std::make_unique(num_nodes, offset); }, label ); diff --git a/tests/unit/termination/test_termination_reset.cc b/tests/unit/termination/test_termination_reset.cc index 2300e7b491..fa003cd28b 100644 --- a/tests/unit/termination/test_termination_reset.cc +++ b/tests/unit/termination/test_termination_reset.cc @@ -59,7 +59,7 @@ struct TestTermReset : TestParallelHarness { static int32_t handler_count; - static void test_handler(TestMsg* msg) { + static void test_handler([[maybe_unused]] TestMsg* msg) { handler_count = 10; } }; diff --git a/tutorial/tutorial_1e.h b/tutorial/tutorial_1e.h index bd21eacbf8..67fe611c7f 100644 --- a/tutorial/tutorial_1e.h +++ b/tutorial/tutorial_1e.h @@ -87,7 +87,7 @@ static inline void activeMessageGroupRoot() { } // Message handler -static void msgHandlerGroupA(MySimpleMsg* msg) { +static void msgHandlerGroupA([[maybe_unused]] MySimpleMsg* msg) { auto const cur_node = ::vt::theContext()->getNode(); vtAssert(cur_node >= 1, "This handler should only execute on nodes >= 1"); diff --git a/tutorial/tutorial_1f.h b/tutorial/tutorial_1f.h index fc6a79742c..6d6212a425 100644 --- a/tutorial/tutorial_1f.h +++ b/tutorial/tutorial_1f.h @@ -92,7 +92,7 @@ static inline void activeMessageGroupCollective() { } // Message handler -static void msgHandlerGroupB(MySimpleMsg2* msg) { +static void msgHandlerGroupB([[maybe_unused]] MySimpleMsg2* msg) { auto const cur_node = ::vt::theContext()->getNode(); vtAssert(cur_node % 2 == 0, "This handler should only execute on even nodes"); diff --git a/tutorial/tutorial_2a.h b/tutorial/tutorial_2a.h index d3e8f47056..c7df7743ca 100644 --- a/tutorial/tutorial_2a.h +++ b/tutorial/tutorial_2a.h @@ -66,7 +66,7 @@ struct MyCol : ::vt::Collection { // \ / struct MyCollMsg : ::vt::CollectionMessage { }; -void MyCol::msgHandler(MyCollMsg* msg) { +void MyCol::msgHandler([[maybe_unused]] MyCollMsg* msg) { auto cur_node = theContext()->getNode(); auto idx = this->getIndex(); ::fmt::print("MyCol::msgHandler index={}, node={}\n", idx.x(), cur_node);