diff --git a/src/vt/context/runnable_context/trace.h b/src/vt/context/runnable_context/trace.h index aa4577bf28..e60800cfe2 100644 --- a/src/vt/context/runnable_context/trace.h +++ b/src/vt/context/runnable_context/trace.h @@ -130,7 +130,7 @@ struct Trace { struct Trace { template - Trace(Args&&... args) {} + Trace([[maybe_unused]] Args&&... args) {} }; diff --git a/src/vt/messaging/active.cc b/src/vt/messaging/active.cc index fbd69715a3..02f3f61753 100644 --- a/src/vt/messaging/active.cc +++ b/src/vt/messaging/active.cc @@ -167,7 +167,9 @@ void ActiveMessenger::startup() { /*virtual*/ ActiveMessenger::~ActiveMessenger() {} trace::TraceEventIDType ActiveMessenger::makeTraceCreationSend( - HandlerType const handler, ByteType serialized_msg_size, bool is_bcast + [[maybe_unused]] HandlerType const handler, + [[maybe_unused]] ByteType serialized_msg_size, + [[maybe_unused]] bool is_bcast ) { #if vt_check_enabled(trace_enabled) trace::TraceEntryIDType ep = auto_registry::handlerTraceID(handler); diff --git a/src/vt/messaging/active.impl.h b/src/vt/messaging/active.impl.h index 13c94651e3..9df798818d 100644 --- a/src/vt/messaging/active.impl.h +++ b/src/vt/messaging/active.impl.h @@ -71,21 +71,27 @@ void ActiveMessenger::markAsTermMessage(MsgPtrT const msg) { } template -void ActiveMessenger::markAsLocationMessage(MsgPtrT const msg) { +void ActiveMessenger::markAsLocationMessage( + [[maybe_unused]] MsgPtrT const msg +) { #if vt_check_enabled(trace_enabled) envelopeSetTraceRuntimeEnabled(msg->env, theConfig()->traceLocation()); #endif } template -void ActiveMessenger::markAsSerialMsgMessage(MsgPtrT const msg) { +void ActiveMessenger::markAsSerialMsgMessage( + [[maybe_unused]] MsgPtrT const msg +) { #if vt_check_enabled(trace_enabled) envelopeSetTraceRuntimeEnabled(msg->env, theConfig()->traceSerialMsg()); #endif } template -void ActiveMessenger::markAsCollectionMessage(MsgPtrT const msg) { +void ActiveMessenger::markAsCollectionMessage( + [[maybe_unused]] MsgPtrT const msg +) { #if vt_check_enabled(trace_enabled) envelopeSetTraceRuntimeEnabled(msg->env, theConfig()->traceCollection()); #endif diff --git a/src/vt/pipe/pipe_manager_tl.impl.h b/src/vt/pipe/pipe_manager_tl.impl.h index 6ddcecb67e..48c6ef919c 100644 --- a/src/vt/pipe/pipe_manager_tl.impl.h +++ b/src/vt/pipe/pipe_manager_tl.impl.h @@ -228,7 +228,7 @@ auto PipeManagerTL::makeCallbackProxy(ProxyT proxy) { } template -auto PipeManagerTL::makeCallbackSingle(NodeType node) { +auto PipeManagerTL::makeCallbackSingle([[maybe_unused]] NodeType node) { auto const new_pipe_id = makePipeID(true,false); using Trait = FuncTraits; diff --git a/src/vt/pool/pool.cc b/src/vt/pool/pool.cc index 5a9603273f..3dc91077fd 100644 --- a/src/vt/pool/pool.cc +++ b/src/vt/pool/pool.cc @@ -197,7 +197,9 @@ void Pool::dealloc(std::byte* const buf) { } } -Pool::SizeType Pool::remainingSize(std::byte* const buf) const { +Pool::SizeType Pool::remainingSize( + [[maybe_unused]] std::byte* const buf +) const { #if vt_check_enabled(memory_pool) auto const& actual_alloc_size = HeaderManagerType::getHeaderBytes(buf); auto const& oversize = HeaderManagerType::getHeaderOversizeBytes(buf); diff --git a/src/vt/rdma/state/rdma_state.cc b/src/vt/rdma/state/rdma_state.cc index 89f0bb3f30..d4fb1c6293 100644 --- a/src/vt/rdma/state/rdma_state.cc +++ b/src/vt/rdma/state/rdma_state.cc @@ -221,7 +221,7 @@ bool State::testReadyPutData(TagType const& tag) { void State::getData( GetMessage* msg, bool const& is_user_msg, RDMA_InfoType const& info, - NodeType const& from_node + [[maybe_unused]] NodeType const& from_node ) { auto const& tag = info.tag; @@ -289,7 +289,7 @@ void State::getData( void State::putData( PutMessage* msg, bool const& is_user_msg, RDMA_InfoType const& info, - NodeType const& from_node + [[maybe_unused]] NodeType const& from_node ) { auto const& tag = info.tag; diff --git a/src/vt/registry/auto/auto_registry_impl.h b/src/vt/registry/auto/auto_registry_impl.h index fb33045221..e65447e718 100644 --- a/src/vt/registry/auto/auto_registry_impl.h +++ b/src/vt/registry/auto/auto_registry_impl.h @@ -200,7 +200,9 @@ inline AutoActiveType const& getAutoHandler(HandlerType const handler) { template f> void setHandlerTraceNameObjGroup( - HandlerControlType ctrl, std::string const& name, std::string const& parent + [[maybe_unused]] HandlerControlType ctrl, + [[maybe_unused]] std::string const& name, + [[maybe_unused]] std::string const& parent ) { #if vt_check_enabled(trace_enabled) auto const handler = makeAutoHandlerObjGroup(ctrl); @@ -210,7 +212,10 @@ void setHandlerTraceNameObjGroup( } template * f> -void setHandlerTraceName(std::string const& name, std::string const& parent) { +void setHandlerTraceName( + [[maybe_unused]] std::string const& name, + [[maybe_unused]] std::string const& parent +) { #if vt_check_enabled(trace_enabled) auto const handler = makeAutoHandler(); auto const trace_id = handlerTraceID(handler); @@ -219,7 +224,10 @@ void setHandlerTraceName(std::string const& name, std::string const& parent) { } template -void setHandlerTraceName(std::string const& name, std::string const& parent) { +void setHandlerTraceName( + [[maybe_unused]] std::string const& name, + [[maybe_unused]] std::string const& parent +) { #if vt_check_enabled(trace_enabled) auto const handler = makeAutoHandlerParam(); auto const trace_id = handlerTraceID(handler); diff --git a/src/vt/registry/auto/collection/auto_registry_collection.impl.h b/src/vt/registry/auto/collection/auto_registry_collection.impl.h index 062241c4ee..c8edf12f0f 100644 --- a/src/vt/registry/auto/collection/auto_registry_collection.impl.h +++ b/src/vt/registry/auto/collection/auto_registry_collection.impl.h @@ -112,7 +112,10 @@ inline HandlerType makeAutoHandlerCollectionMemParam() { } template * f> -void setHandlerTraceNameColl(std::string const& name, std::string const& parent) { +void setHandlerTraceNameColl( + [[maybe_unused]] std::string const& name, + [[maybe_unused]] std::string const& parent +) { #if vt_check_enabled(trace_enabled) auto const handler = makeAutoHandlerCollection(); auto const trace_id = handlerTraceID(handler); @@ -121,7 +124,10 @@ void setHandlerTraceNameColl(std::string const& name, std::string const& parent) } template f> -void setHandlerTraceNameCollMem(std::string const& name, std::string const& parent) { +void setHandlerTraceNameCollMem( + [[maybe_unused]] std::string const& name, + [[maybe_unused]] std::string const& parent +) { #if vt_check_enabled(trace_enabled) auto const handler = makeAutoHandlerCollectionMem(); auto const trace_id = handlerTraceID(handler); diff --git a/src/vt/runnable/make_runnable.h b/src/vt/runnable/make_runnable.h index 382c6eda03..5f2cc7b275 100644 --- a/src/vt/runnable/make_runnable.h +++ b/src/vt/runnable/make_runnable.h @@ -180,7 +180,9 @@ struct RunnableMaker { * captured one) */ template - RunnableMaker&& withLBData(ElmT* elm, MsgU* msg) { + RunnableMaker&& withLBData( + [[maybe_unused]] ElmT* elm, [[maybe_unused]] MsgU* msg + ) { #if vt_check_enabled(lblite) impl_->addContextLB(elm, msg); #endif @@ -204,7 +206,9 @@ struct RunnableMaker { * \param[in] elm_id the element ID */ template - RunnableMaker&& withLBData(LBDataT* lb_data, T elm_id) { + RunnableMaker&& withLBData( + [[maybe_unused]] LBDataT* lb_data, [[maybe_unused]] T elm_id + ) { #if vt_check_enabled(lblite) impl_->addContextLB(lb_data, elm_id); #endif @@ -217,7 +221,7 @@ struct RunnableMaker { * \param[in] elm the element */ template - RunnableMaker&& withLBData(ElmT* elm) { + RunnableMaker&& withLBData([[maybe_unused]] ElmT* elm) { #if vt_check_enabled(lblite) impl_->addContextLB(elm, msg_.get()); #endif diff --git a/src/vt/runtime/component/meter/counter.h b/src/vt/runtime/component/meter/counter.h index 4c890f61b4..0ba91dbead 100644 --- a/src/vt/runtime/component/meter/counter.h +++ b/src/vt/runtime/component/meter/counter.h @@ -77,7 +77,7 @@ struct Counter : DiagnosticMeter { * * \param[in] val amount to increment */ - void increment(T val = 1) { + void increment([[maybe_unused]] T val = 1) { # if vt_check_enabled(diagnostics) if (impl_) { impl_->update(val); @@ -90,7 +90,7 @@ struct Counter : DiagnosticMeter { * * \param[in] val amount to decrement */ - void decrement(T val = 1) { + void decrement([[maybe_unused]] T val = 1) { # if vt_check_enabled(diagnostics) if (impl_) { impl_->update(-val); diff --git a/src/vt/runtime/component/meter/gauge.h b/src/vt/runtime/component/meter/gauge.h index e343417bb2..13b0be634b 100644 --- a/src/vt/runtime/component/meter/gauge.h +++ b/src/vt/runtime/component/meter/gauge.h @@ -82,7 +82,7 @@ struct Gauge : DiagnosticStatsPack { * * \param[in] val the new value */ - void update(T val) { + void update([[maybe_unused]] T val) { # if vt_check_enabled(diagnostics) this->updateStats(val); # endif diff --git a/src/vt/runtime/component/meter/timer.h b/src/vt/runtime/component/meter/timer.h index 7e1a40efc9..f5dc220980 100644 --- a/src/vt/runtime/component/meter/timer.h +++ b/src/vt/runtime/component/meter/timer.h @@ -84,7 +84,7 @@ struct Timer : DiagnosticStatsPack { * \param[in] begin begin time of event being tracked * \param[in] end end time of event being tracked */ - void update(T begin, T end) { + void update([[maybe_unused]] T begin, [[maybe_unused]] T end) { # if vt_check_enabled(diagnostics) auto const duration = end - begin; this->updateStats(duration); diff --git a/src/vt/trace/trace.cc b/src/vt/trace/trace.cc index 833b20eb9a..83aff586a8 100644 --- a/src/vt/trace/trace.cc +++ b/src/vt/trace/trace.cc @@ -211,7 +211,10 @@ void Trace::registerUserEventManual( user_event_.user(name, id); } -void insertNewUserEvent(UserEventIDType event, std::string const& name) { +void insertNewUserEvent( + [[maybe_unused]] UserEventIDType event, + [[maybe_unused]] std::string const& name +) { #if vt_check_enabled(trace_enabled) theTrace()->user_event_.insertEvent(event, name); #endif diff --git a/src/vt/trace/trace_registry.cc b/src/vt/trace/trace_registry.cc index a2047b9527..9b3d750250 100644 --- a/src/vt/trace/trace_registry.cc +++ b/src/vt/trace/trace_registry.cc @@ -121,7 +121,9 @@ TraceRegistry::registerEventHashed( /*static*/ void TraceRegistry::setTraceName( - TraceEntryIDType id, std::string const& name, std::string const& type_name + [[maybe_unused]] TraceEntryIDType id, + [[maybe_unused]] std::string const& name, + [[maybe_unused]] std::string const& type_name ) { #if vt_check_enabled(trace_enabled) auto* events = TraceContainers::getEventContainer(); diff --git a/src/vt/trace/trace_user.cc b/src/vt/trace/trace_user.cc index ee4754ffbf..0733f68c04 100644 --- a/src/vt/trace/trace_user.cc +++ b/src/vt/trace/trace_user.cc @@ -51,7 +51,9 @@ namespace vt { namespace trace { -UserEventIDType registerEventCollective(std::string const& name) { +UserEventIDType registerEventCollective( + [[maybe_unused]] std::string const& name +) { #if vt_check_enabled(trace_enabled) return theTrace()->registerUserEventColl(name); #else @@ -59,7 +61,7 @@ UserEventIDType registerEventCollective(std::string const& name) { #endif } -UserEventIDType registerEventRooted(std::string const& name) { +UserEventIDType registerEventRooted([[maybe_unused]] std::string const& name) { #if vt_check_enabled(trace_enabled) return theTrace()->registerUserEventRoot(name); #else @@ -67,7 +69,7 @@ UserEventIDType registerEventRooted(std::string const& name) { #endif } -UserEventIDType registerEventHashed(std::string const& name) { +UserEventIDType registerEventHashed([[maybe_unused]] std::string const& name) { #if vt_check_enabled(trace_enabled) return theTrace()->registerUserEventHash(name); #else @@ -75,33 +77,37 @@ UserEventIDType registerEventHashed(std::string const& name) { #endif } -void addUserEvent(UserEventIDType event) { +void addUserEvent([[maybe_unused]] UserEventIDType event) { #if vt_check_enabled(trace_enabled) theTrace()->addUserEvent(event); #endif } -void addUserEventBracketed(UserEventIDType event, TimeType begin, TimeType end) { +void addUserEventBracketed( + [[maybe_unused]] UserEventIDType event, [[maybe_unused]] TimeType begin, + [[maybe_unused]] TimeType end +) { #if vt_check_enabled(trace_enabled) theTrace()->addUserEventBracketed(event, begin, end); #endif } -void addUserNote(std::string const& note) { +void addUserNote([[maybe_unused]] std::string const& note) { #if vt_check_enabled(trace_enabled) theTrace()->addUserNote(note); #endif } -void addUserData(int32_t data) { +void addUserData([[maybe_unused]] int32_t data) { #if vt_check_enabled(trace_enabled) theTrace()->addUserData(data); #endif } void addUserBracketedNote( - TimeType const begin, TimeType const end, std::string const& note, - TraceEventIDType const event + [[maybe_unused]] TimeType const begin, [[maybe_unused]] TimeType const end, + [[maybe_unused]] std::string const& note, + [[maybe_unused]] TraceEventIDType const event ) { #if vt_check_enabled(trace_enabled) theTrace()->addUserBracketedNote(begin, end, note, event); @@ -116,7 +122,10 @@ struct UserSplitHolder final { /*static*/ std::unordered_map UserSplitHolder::split_ = {}; #endif -void addUserNotePre(std::string const& note, TraceEventIDType const) { +void addUserNotePre( + [[maybe_unused]] std::string const& note, + [[maybe_unused]] TraceEventIDType const +) { #if vt_check_enabled(trace_enabled) auto iter = UserSplitHolder::split_.find(note); vtAssertExpr(iter == UserSplitHolder::split_.end()); @@ -128,7 +137,10 @@ void addUserNotePre(std::string const& note, TraceEventIDType const) { #endif } -void addUserNoteEpi(std::string const& in_note, TraceEventIDType const event) { +void addUserNoteEpi( + [[maybe_unused]] std::string const& in_note, + [[maybe_unused]] TraceEventIDType const event +) { #if vt_check_enabled(trace_enabled) auto iter = UserSplitHolder::split_.find(in_note); vtAssertExpr(iter != UserSplitHolder::split_.end()); diff --git a/src/vt/trace/trace_user.h b/src/vt/trace/trace_user.h index a5dbc0809e..a9aa2a8d3e 100644 --- a/src/vt/trace/trace_user.h +++ b/src/vt/trace/trace_user.h @@ -324,7 +324,7 @@ struct TraceScopedNote final { TraceScopedNote(std::string const&, TraceEventIDType const = no_trace_event) { } void end() { } - void setEvent(TraceEventIDType const in_event) { } + void setEvent([[maybe_unused]] TraceEventIDType const in_event) { } }; struct TraceScopedEvent final { diff --git a/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc b/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc index e457270424..3728fe7b84 100644 --- a/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc +++ b/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc @@ -595,8 +595,9 @@ std::unique_ptr ZoltanLB::makeGraph() { } /*static*/ void ZoltanLB::getVertexList( - void *data, int gid_size, int lid_size, ZOLTAN_ID_PTR global_id, - ZOLTAN_ID_PTR local_id, int weight_dim, float *obj_weights, int *ierr + void *data, [[maybe_unused]] int gid_size, [[maybe_unused]] int lid_size, + ZOLTAN_ID_PTR global_id, ZOLTAN_ID_PTR local_id, + [[maybe_unused]] int weight_dim, float *obj_weights, int *ierr ) { Graph* graph = reinterpret_cast(data); for (int i = 0; i < graph->num_vertices; i++) { @@ -618,8 +619,9 @@ std::unique_ptr ZoltanLB::makeGraph() { } /*static*/ void ZoltanLB::getHypergraph( - void *data, int gid_size, int num_edges, int num_nonzeroes, int format, - ZOLTAN_ID_PTR edge_gid, int *vertex_ptr, ZOLTAN_ID_PTR vertex_gid, int *ierr + void *data, [[maybe_unused]] int gid_size, int num_edges, int num_nonzeroes, + int format, ZOLTAN_ID_PTR edge_gid, int *vertex_ptr, + ZOLTAN_ID_PTR vertex_gid, int *ierr ) { Graph* graph = reinterpret_cast(data); bool const edge_equal = num_edges == graph->num_edges; @@ -656,8 +658,9 @@ std::unique_ptr ZoltanLB::makeGraph() { } /*static*/ void ZoltanLB::getHypergraphEdgeWeights( - void *data, int num_gid, int num_lid, int num_edges, int edge_weight_dim, - ZOLTAN_ID_PTR edge_gid, ZOLTAN_ID_PTR edge_lid, float *edge_weights, int *ierr + void *data, [[maybe_unused]] int num_gid, [[maybe_unused]] int num_lid, + int num_edges, [[maybe_unused]] int edge_weight_dim, ZOLTAN_ID_PTR edge_gid, + ZOLTAN_ID_PTR edge_lid, float *edge_weights, int *ierr ) { Graph* graph = reinterpret_cast(data); for (int i = 0; i < num_edges; i++) { diff --git a/src/vt/vrt/collection/manager.impl.h b/src/vt/vrt/collection/manager.impl.h index 6864393984..be71efb95e 100644 --- a/src/vt/vrt/collection/manager.impl.h +++ b/src/vt/vrt/collection/manager.impl.h @@ -205,7 +205,7 @@ GroupType CollectionManager::createGroupCollection( template /*static*/ void CollectionManager::collectionAutoMsgDeliver( MsgT* msg, Indexable* base, HandlerType han, NodeType from, - trace::TraceEventIDType event, bool immediate + [[maybe_unused]] trace::TraceEventIDType event, bool immediate ) { // Expand out the index for tracing purposes; Projections takes up to // 4-dimensions @@ -511,7 +511,7 @@ void CollectionManager::invokeMsg( template void CollectionManager::invokeMsgImpl( VirtualElmProxyType const& proxy, MsgSharedPtr msg, - bool instrument + [[maybe_unused]] bool instrument ) { using IndexT = typename ColT::IndexType; @@ -674,7 +674,8 @@ messaging::PendingSend CollectionManager::broadcastCollectiveMsg( template messaging::PendingSend CollectionManager::broadcastCollectiveMsgImpl( - CollectionProxyWrapType const& proxy, MsgPtr& msg, bool instrument + CollectionProxyWrapType const& proxy, MsgPtr& msg, + [[maybe_unused]] bool instrument ) { using IndexT = typename ColT::IndexType; @@ -794,7 +795,7 @@ messaging::PendingSend CollectionManager::broadcastNormalMsg( template messaging::PendingSend CollectionManager::broadcastMsgUntypedHandler( CollectionProxyWrapType const& toProxy, MsgT* raw_msg, - HandlerType const handler, bool instrument + HandlerType const handler, [[maybe_unused]] bool instrument ) { auto const idx = makeVrtDispatch(); auto const col_proxy = toProxy.getProxy();