diff --git a/examples/checkpoint_example_polymorphic.cc b/examples/checkpoint_example_polymorphic.cc index 539bb50e..eafa2355 100644 --- a/examples/checkpoint_example_polymorphic.cc +++ b/examples/checkpoint_example_polymorphic.cc @@ -70,7 +70,7 @@ struct MyObj : ::checkpoint::SerializableDerived { explicit MyObj(::checkpoint::SERIALIZE_CONSTRUCT_TAG){} template - void serialize(SerializerT& s) { + void serialize(SerializerT&) { printf("MyObj: serialize\n"); } @@ -85,7 +85,7 @@ struct MyObj2 : ::checkpoint::SerializableDerived { explicit MyObj2(::checkpoint::SERIALIZE_CONSTRUCT_TAG) {} template - void serialize(SerializerT& s) { + void serialize(SerializerT&) { printf("MyObj2: serialize\n"); } void test() override { diff --git a/examples/checkpoint_example_polymorphic_macro.cc b/examples/checkpoint_example_polymorphic_macro.cc index d30e94f2..f1f17a59 100644 --- a/examples/checkpoint_example_polymorphic_macro.cc +++ b/examples/checkpoint_example_polymorphic_macro.cc @@ -79,7 +79,7 @@ struct MyObj : public MyBase { checkpoint_virtual_serialize_derived_from(MyBase) template - void serialize(SerializerT& s) { + void serialize(SerializerT&) { printf("MyObj: serialize\n"); } @@ -97,7 +97,7 @@ struct MyObj2 : public MyBase { checkpoint_virtual_serialize_derived_from(MyBase) template - void serialize(SerializerT& s) { + void serialize(SerializerT&) { printf("MyObj2: serialize\n"); } void test() override { diff --git a/examples/checkpoint_example_polymorphic_macro_nonintrusive.cc b/examples/checkpoint_example_polymorphic_macro_nonintrusive.cc index 8ae07db1..edb88041 100644 --- a/examples/checkpoint_example_polymorphic_macro_nonintrusive.cc +++ b/examples/checkpoint_example_polymorphic_macro_nonintrusive.cc @@ -151,12 +151,12 @@ void serialize(S& s, MyBase& obj) { } template -void serialize(SerializerT& s, MyObj& obj) { +void serialize(SerializerT&, MyObj&) { printf("MyObj: serialize\n"); } template -void serialize(SerializerT& s, MyObj2& obj) { +void serialize(SerializerT&, MyObj2&) { printf("MyObj2: serialize\n"); } diff --git a/examples/checkpoint_example_polymorphic_nonintrusive.cc b/examples/checkpoint_example_polymorphic_nonintrusive.cc index 12110c0e..0eb9cceb 100644 --- a/examples/checkpoint_example_polymorphic_nonintrusive.cc +++ b/examples/checkpoint_example_polymorphic_nonintrusive.cc @@ -136,12 +136,12 @@ void serialize(S& s, MyBase& obj) { } template -void serialize(SerializerT& s, MyObj& obj) { +void serialize(SerializerT&, MyObj&) { printf("MyObj: serialize\n"); } template -void serialize(SerializerT& s, MyObj2& obj) { +void serialize(SerializerT&, MyObj2&) { printf("MyObj2: serialize\n"); } diff --git a/examples/checkpoint_example_traversal.cc b/examples/checkpoint_example_traversal.cc index fb6fc765..eea1583a 100644 --- a/examples/checkpoint_example_traversal.cc +++ b/examples/checkpoint_example_traversal.cc @@ -83,7 +83,7 @@ struct TestObject { struct PrintBytesTraverse : checkpoint::BaseSerializer { PrintBytesTraverse() : checkpoint::BaseSerializer(checkpoint::eSerializationMode::None) { } - void contiguousBytes(void* ptr, std::size_t size, std::size_t num_elms) { + void contiguousBytes(void*, std::size_t size, std::size_t num_elms) { printf("PrintBytesTraverse: size=%zu, num_elms=%zu\n", size, num_elms); } }; @@ -114,7 +114,7 @@ struct CustomDispatch { // skip that overload template struct CustomDispatch> { - static void serializeNonIntrusive(SerializerT& s, std::vector& t) { + static void serializeNonIntrusive(SerializerT&, std::vector& t) { // Do something special here: e.g., an RDMA for the vector during packing printf("Traversing vector: size=%zu\n", t.size()); for (std::size_t i = 0; i < t.size(); i++) { diff --git a/examples/checkpoint_example_traversal_nonintrusive.cc b/examples/checkpoint_example_traversal_nonintrusive.cc index a3a5de8d..8131c461 100644 --- a/examples/checkpoint_example_traversal_nonintrusive.cc +++ b/examples/checkpoint_example_traversal_nonintrusive.cc @@ -95,7 +95,7 @@ void serialize(Serializer& s, TestObject& obj) { struct PrintBytesTraverse : checkpoint::BaseSerializer { PrintBytesTraverse() : checkpoint::BaseSerializer(checkpoint::eSerializationMode::None) { } - void contiguousBytes(void* ptr, std::size_t size, std::size_t num_elms) { + void contiguousBytes(void*, std::size_t size, std::size_t num_elms) { printf("PrintBytesTraverse: size=%zu, num_elms=%zu\n", size, num_elms); } }; @@ -126,7 +126,7 @@ struct CustomDispatch { // skip that overload template struct CustomDispatch> { - static void serializeNonIntrusive(SerializerT& s, std::vector& t) { + static void serializeNonIntrusive(SerializerT&, std::vector& t) { // Do something special here: e.g., an RDMA for the vector during packing printf("Traversing vector: size=%zu\n", t.size()); for (std::size_t i = 0; i < t.size(); i++) { diff --git a/src/checkpoint/buffer/buffer.h b/src/checkpoint/buffer/buffer.h index 1839d83f..66cf0f0a 100644 --- a/src/checkpoint/buffer/buffer.h +++ b/src/checkpoint/buffer/buffer.h @@ -54,8 +54,8 @@ namespace checkpoint { namespace buffer { using SerializedInfo = ::checkpoint::SerializedInfo; struct Buffer : SerializedInfo { - virtual SerialByteType* getBuffer() const = 0; - virtual SerialSizeType getSize() const = 0; + virtual SerialByteType* getBuffer() const override = 0; + virtual SerialSizeType getSize() const override = 0; virtual ~Buffer() { } }; diff --git a/src/checkpoint/container/list_serialize.h b/src/checkpoint/container/list_serialize.h index c1bda13d..d616c11f 100644 --- a/src/checkpoint/container/list_serialize.h +++ b/src/checkpoint/container/list_serialize.h @@ -99,7 +99,7 @@ inline typename std::enable_if_t< std::is_same::value, void > deserializeOrderedElems( - Serializer& s, ContainerT& cont, typename ContainerT::size_type size + Serializer&, ContainerT&, typename ContainerT::size_type ) { } template diff --git a/src/checkpoint/container/map_serialize.h b/src/checkpoint/container/map_serialize.h index 8ace2172..39313a09 100644 --- a/src/checkpoint/container/map_serialize.h +++ b/src/checkpoint/container/map_serialize.h @@ -80,7 +80,7 @@ inline typename std::enable_if_t< std::is_same::value, void > deserializeEmplaceElems( - Serializer& s, ContainerT& cont, typename ContainerT::size_type size + Serializer&, ContainerT&, typename ContainerT::size_type ) { } template diff --git a/src/checkpoint/container/variant_serialize.h b/src/checkpoint/container/variant_serialize.h index 9ded5b25..ddabdd46 100644 --- a/src/checkpoint/container/variant_serialize.h +++ b/src/checkpoint/container/variant_serialize.h @@ -84,7 +84,7 @@ template <> struct SerializeEntry<> { template static void serialize( - SerializerT& s, VariantT& v, std::size_t entry, std::size_t cur + SerializerT&, VariantT&, std::size_t, std::size_t ) { // base case } diff --git a/src/checkpoint/container/view_equality.h b/src/checkpoint/container/view_equality.h index 6b1bf59f..6a3bd277 100644 --- a/src/checkpoint/container/view_equality.h +++ b/src/checkpoint/container/view_equality.h @@ -159,21 +159,21 @@ struct ViewEqualityStatic { } template - bool operator()(Kokkos::View const& v, Callable eq) { + bool operator()(Kokkos::View const&, Callable) { // No static dimension to check against dynamic dimension, return true return true; } template bool operator()( - Kokkos::Experimental::DynamicView const& v, Callable eq + Kokkos::Experimental::DynamicView const&, Callable ) { // No static dimension to check against dynamic dimension, return true return true; } template - bool operator()(Kokkos::DynRankView const& v, Callable eq) { + bool operator()(Kokkos::DynRankView const&, Callable) { // No static dimension to check against dynamic dimension, return true return true; } diff --git a/src/checkpoint/container/view_traits_extract.h b/src/checkpoint/container/view_traits_extract.h index e7b7d774..cc3a7756 100644 --- a/src/checkpoint/container/view_traits_extract.h +++ b/src/checkpoint/container/view_traits_extract.h @@ -91,7 +91,7 @@ template < struct CountDims { using BaseT = typename std::decay::type; static constexpr size_t dynamic = 0; - static int numDims(ViewType const& view) { return 0; } + static int numDims(ViewType const&) { return 0; } }; template diff --git a/src/checkpoint/dispatch/clean_type.h b/src/checkpoint/dispatch/clean_type.h index 045f04a3..8e6fc260 100644 --- a/src/checkpoint/dispatch/clean_type.h +++ b/src/checkpoint/dispatch/clean_type.h @@ -66,12 +66,12 @@ struct CleanType { } template - static NonConstRefT* apply1(T* val, isConst* x = nullptr) { + static NonConstRefT* apply1(T* val, isConst* = nullptr) { return reinterpret_cast(const_cast(val)); } template - static NonConstRefT* apply1(T* val, isNotConst* x = nullptr) { + static NonConstRefT* apply1(T* val, isNotConst* = nullptr) { return reinterpret_cast(val); } }; diff --git a/src/checkpoint/dispatch/dispatch_serializer_byte.h b/src/checkpoint/dispatch/dispatch_serializer_byte.h index 7c91adfe..a712345d 100644 --- a/src/checkpoint/dispatch/dispatch_serializer_byte.h +++ b/src/checkpoint/dispatch/dispatch_serializer_byte.h @@ -66,14 +66,14 @@ struct SerializerDispatchByte { template void operator()( - SerializerT& s, T* val, SerialSizeType num, isByteCopyType* x = nullptr + SerializerT& s, T* val, SerialSizeType num, isByteCopyType* = nullptr ) { s.contiguousTyped(s, val, num); } template void operator()( - SerializerT& s, T* val, SerialSizeType num, isNotByteCopyType* x = nullptr + SerializerT& s, T* val, SerialSizeType num, isNotByteCopyType* = nullptr ) { SerializerDispatchNonByte dispatch; dispatch(s, val, num); diff --git a/src/checkpoint/dispatch/dispatch_serializer_nonbyte.h b/src/checkpoint/dispatch/dispatch_serializer_nonbyte.h index 5da80f9b..59cd8510 100644 --- a/src/checkpoint/dispatch/dispatch_serializer_nonbyte.h +++ b/src/checkpoint/dispatch/dispatch_serializer_nonbyte.h @@ -128,7 +128,7 @@ struct SerializerDispatchNonByte { template void applyElm( - SerializerT& s, T* val, hasNotSplitSerialize* = nullptr + SerializerT&, T*, hasNotSplitSerialize* = nullptr ) { } template diff --git a/src/checkpoint/dispatch/reconstructor.h b/src/checkpoint/dispatch/reconstructor.h index 7a8a07f0..f35f71d1 100644 --- a/src/checkpoint/dispatch/reconstructor.h +++ b/src/checkpoint/dispatch/reconstructor.h @@ -152,7 +152,7 @@ struct Reconstructor { } template - static T* constructAllowFailImpl(void* buf, isNotConstructible* = nullptr) { + static T* constructAllowFailImpl(void*, isNotConstructible* = nullptr) { constexpr int max_buffer_length = 32768; std::unique_ptr msg = std::make_unique(max_buffer_length); snprintf( diff --git a/src/checkpoint/dispatch/vrt/base.h b/src/checkpoint/dispatch/vrt/base.h index 425a80ab..9388a7dc 100644 --- a/src/checkpoint/dispatch/vrt/base.h +++ b/src/checkpoint/dispatch/vrt/base.h @@ -87,6 +87,8 @@ namespace checkpoint { namespace dispatch { namespace vrt { template struct SerializableBase { checkpoint_virtual_serialize_root() + + virtual ~SerializableBase() {} }; }}} /* end namespace checkpoint::dispatch::vrt */ diff --git a/src/checkpoint/dispatch/vrt/virtual_serialize.h b/src/checkpoint/dispatch/vrt/virtual_serialize.h index 426352e9..0596b88b 100644 --- a/src/checkpoint/dispatch/vrt/virtual_serialize.h +++ b/src/checkpoint/dispatch/vrt/virtual_serialize.h @@ -91,7 +91,7 @@ struct SerializeVirtualTypeIfNeeded< > > { - static dispatch::vrt::TypeIdx apply(SerializerT& s, T* target) { + static dispatch::vrt::TypeIdx apply(SerializerT&, T*) { // no type idx needed in this case return dispatch::vrt::no_type_idx; } @@ -149,7 +149,7 @@ struct ReconstructAsVirtualIfNeeded< not std::is_same::value > > { - static T* apply(SerializerT& s, dispatch::vrt::TypeIdx entry) { + static T* apply(SerializerT&, dispatch::vrt::TypeIdx) { // no type idx needed in this case, static construction in default case auto t = std::allocator{}.allocate(1); return dispatch::Reconstructor::construct(t); @@ -165,7 +165,7 @@ struct ReconstructAsVirtualIfNeeded< std::is_same::value > > { - static T* apply(SerializerT& s, dispatch::vrt::TypeIdx entry) { return nullptr; } + static T* apply(SerializerT&, dispatch::vrt::TypeIdx) { return nullptr; } }; template @@ -176,7 +176,7 @@ struct ReconstructAsVirtualIfNeeded< dispatch::vrt::VirtualSerializeTraits::has_virtual_serialize > > { - static T* apply(SerializerT& s, dispatch::vrt::TypeIdx entry) { + static T* apply(SerializerT&, dispatch::vrt::TypeIdx entry) { using BaseT = ::checkpoint::dispatch::vrt::checkpoint_base_type_t; // use type idx here, registration needed for proper type re-construction diff --git a/src/checkpoint/serializers/base_serializer.h b/src/checkpoint/serializers/base_serializer.h index 6c4de046..38308e76 100644 --- a/src/checkpoint/serializers/base_serializer.h +++ b/src/checkpoint/serializers/base_serializer.h @@ -126,14 +126,14 @@ struct BaseSerializer { * \param[in] t an element */ template - void countBytes(const T& t) {} + void countBytes(T const&) {} /** * \brief Add bytes for footprinting---default empty implementation * * \param[in] s the amount of bytes to add */ - void addBytes(std::size_t s) {} + void addBytes(std::size_t) {} /** * \brief Add contiguous bytes to the sizer @@ -142,7 +142,7 @@ struct BaseSerializer { * \param[in] size the number of bytes for each element * \param[in] num_elms the number of elements */ - void contiguousBytes(void* ptr, SerialSizeType size, SerialSizeType num_elms) {} + void contiguousBytes(void*, SerialSizeType, SerialSizeType) {} /** * \brief Returns size of buffer (in bytes) used during given serialization @@ -170,7 +170,7 @@ struct BaseSerializer { * \note Used/implemented in serialization sanitizer. */ template - void skip(Args&&... args) { } + void skip(Args&&...) { } /** * \brief Get a buffer if it is associated with the serializer @@ -187,7 +187,7 @@ struct BaseSerializer { * * \return the current spot */ - SerialByteType* getSpotIncrement(SerialSizeType const inc) { return nullptr; } + SerialByteType* getSpotIncrement(SerialSizeType const) { return nullptr; } /** * \brief Check if virtual serialization is disabled diff --git a/src/checkpoint/serializers/stream_serializer.h b/src/checkpoint/serializers/stream_serializer.h index 6136a24d..359b7a69 100644 --- a/src/checkpoint/serializers/stream_serializer.h +++ b/src/checkpoint/serializers/stream_serializer.h @@ -53,7 +53,7 @@ namespace checkpoint { template struct StreamPacker : BaseSerializer { - StreamPacker(SerialSizeType size, StreamT& m_stream) + StreamPacker(SerialSizeType, StreamT& m_stream) : BaseSerializer(ModeType::Packing), stream(m_stream) { //Nothing to do with the size. //Pre-allocating a buffer for the stream has more problems than solutions. diff --git a/tests/unit/test_footprinter.cc b/tests/unit/test_footprinter.cc index 25448c8f..d4845e29 100644 --- a/tests/unit/test_footprinter.cc +++ b/tests/unit/test_footprinter.cc @@ -97,7 +97,7 @@ struct TestBase { }; struct TestDerived2 : TestBase { - explicit TestDerived2(int i) {} + explicit TestDerived2(int) {} explicit TestDerived2(SERIALIZE_CONSTRUCT_TAG) {} checkpoint_virtual_serialize_derived_from(TestBase) diff --git a/tests/unit/test_harness.h b/tests/unit/test_harness.h index 157d3971..14aa4b11 100644 --- a/tests/unit/test_harness.h +++ b/tests/unit/test_harness.h @@ -53,7 +53,7 @@ namespace checkpoint { namespace tests { namespace unit { template struct TestHarnessAny : TestBase { - virtual void SetUp() { + virtual void SetUp() override { argc_ = orig_args_.size(); argv_ = new char*[argc_]; @@ -65,7 +65,7 @@ struct TestHarnessAny : TestBase { } } - virtual void TearDown() { + virtual void TearDown() override { for (int i = 0; i < argc_; i++) { delete [] argv_[i]; } diff --git a/tests/unit/test_traversal.cc b/tests/unit/test_traversal.cc index 93db6ce5..a58d0d4c 100644 --- a/tests/unit/test_traversal.cc +++ b/tests/unit/test_traversal.cc @@ -102,7 +102,7 @@ struct TestObject { struct TestTraverse : checkpoint::BaseSerializer { TestTraverse() : checkpoint::BaseSerializer(checkpoint::eSerializationMode::None) { } - void contiguousBytes(void* ptr, std::size_t size, std::size_t num_elms) { + void contiguousBytes(void*, std::size_t size, std::size_t num_elms) { printf("size=%zu, num=%zu\n", size, num_elms); bytes_ += size * num_elms; } @@ -127,7 +127,7 @@ struct CustomDispatch { template struct CustomDispatch> { - static void serializeNonIntrusive(SerializerT& s, std::vector& t) { + static void serializeNonIntrusive(SerializerT&, std::vector& t) { // Do something special here: e.g., an RDMA for the vector during packing printf("Traversing vector: size=%zu\n", t.size()); for (std::size_t i = 0; i < t.size(); i++) { @@ -143,7 +143,7 @@ struct TestTraverse2 : checkpoint::BaseSerializer { template using DispatcherType = CustomDispatch; - void contiguousBytes(void* ptr, std::size_t size, std::size_t num_elms) { } + void contiguousBytes(void*, std::size_t, std::size_t) { } TestTraverse2() : checkpoint::BaseSerializer(checkpoint::eSerializationMode::None) { } }; diff --git a/tests/unit/test_virtual_serialize.cc b/tests/unit/test_virtual_serialize.cc index 6b99f693..85801b66 100644 --- a/tests/unit/test_virtual_serialize.cc +++ b/tests/unit/test_virtual_serialize.cc @@ -625,7 +625,7 @@ struct HolderBase { virtual ~HolderBase() = default; template - void serialize(Serializer& s) {} + void serialize(Serializer&) {} }; template @@ -635,7 +635,7 @@ struct HolderObjBase : HolderBase { virtual ObjT* get() = 0; template - void serialize(Serializer& s) {} + void serialize(Serializer&) {} }; template