Skip to content

Commit 5a53c90

Browse files
authored
Fix some warnings found in gcc 8.5-14.2 (#1316)
* Addresses some compile warnings under gcc 8.5-14.2
1 parent a696c4e commit 5a53c90

File tree

11 files changed

+28
-23
lines changed

11 files changed

+28
-23
lines changed

src/sst/core/action.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Action : public Activity
2929
Action() {}
3030
~Action() {}
3131

32-
bool isAction() final { return true; }
32+
bool isAction() override final { return true; }
3333

3434
protected:
3535
/** Called to signal to the Simulation object to end the simulation */

src/sst/core/baseComponent.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ Link*
457457
BaseComponent::configureSelfLink(const std::string& name, TimeConverter* time_base, Event::HandlerBase* handler)
458458
{
459459
addSelfLink(name);
460-
return configureLink(name, time_base, handler);
460+
return configureLink(name, *time_base, handler);
461461
}
462462

463463
Link*

src/sst/core/clock.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class Clock : public Action
6666
handler will be left in the clock list.
6767
*/
6868
template <typename classT, typename dataT = void>
69-
using Handler = SSTHandler<bool, Cycle_t, classT, dataT>;
69+
using Handler [[deprecated("Handler has been deprecated. Please use Handler2 as it supports checkpointing.")]] =
70+
SSTHandler<bool, Cycle_t, classT, dataT>;
7071

7172
/**
7273
New style (checkpointable) SSTHandler

src/sst/core/event.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ class Event : public Activity
5858
new Event::Handler<classname, dataT>(this, &classname::function_name, data)
5959
*/
6060
template <typename classT, typename dataT = void>
61-
using Handler = SSTHandler<void, Event*, classT, dataT>;
61+
using Handler
62+
[[deprecated("Handler has been deprecated. Please use Handler2 instead as it supports checkpointing.")]] =
63+
SSTHandler<void, Event*, classT, dataT>;
64+
6265

6366
/**
6467
New style (checkpointable) SSTHandler
@@ -119,9 +122,9 @@ class Event : public Activity
119122

120123
#endif
121124

122-
bool isEvent() final { return true; }
125+
bool isEvent() override final { return true; }
123126

124-
void copyAllDeliveryInfo(const Activity* act) final
127+
void copyAllDeliveryInfo(const Activity* act) override final
125128
{
126129
Activity::copyAllDeliveryInfo(act);
127130
const Event* ev = static_cast<const Event*>(act);

src/sst/core/interfaces/simpleNetwork.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ class SimpleNetwork : public SubComponent
213213
handler will be removed from the clock list.
214214
*/
215215
template <typename classT, typename dataT = void>
216-
using Handler = SSTHandler<bool, int, classT, dataT>;
216+
using Handler [[deprecated("Handler has been deprecated. Please use Handler2 as it supports checkpointing.")]] =
217+
SSTHandler<bool, int, classT, dataT>;
217218

218219
/**
219220
Used to create checkpointable handlers to notify the endpoint

src/sst/core/interfaces/stdMem.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ class StandardMem : public SubComponent
9797
new stdMem::Handler<classname, dataT>(this, &classname::function_name, data)
9898
*/
9999
template <typename classT, typename dataT = void>
100-
using Handler = SSTHandler<void, Request*, classT, dataT>;
100+
using Handler
101+
[[deprecated("Handler has been deprecated. Please use Handler2 instead as it supports checkpointing.")]] =
102+
SSTHandler<void, Request*, classT, dataT>;
101103

102104
/**
103105
Used to create checkpointable handlers for request handling.

src/sst/core/oneshot.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ class OneShot : public Action
5959
new OneShot::Handler<classname, dataT>(this, &classname::function_name, data)
6060
*/
6161
template <typename classT, typename dataT = void>
62-
using Handler = SSTHandlerNoArgs<void, classT, dataT>;
62+
using Handler
63+
[[deprecated("Handler has been deprecated. Please use Handler2 instead as it supports checkpointing.")]] =
64+
SSTHandlerNoArgs<void, classT, dataT>;
6365

6466
/**
6567
Used to create checkpointable handlers for OneShot. The callback function is

src/sst/core/serialization/impl/serialize_insertable.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,14 @@ class serialize_impl<OBJ, std::enable_if_t<is_insertable_v<OBJ>>>
210210
is_same_type_template_v<OBJ, std::unordered_multiset> ) {
211211
typename OBJ::key_type key {};
212212
// TODO: Figure out how to make as_ptr_elem work with sets
213-
SST_SER(key);
213+
opts = SerOption::none;
214+
SST_SER(key, opts);
214215
obj.emplace(std::move(key));
215216
}
216217
else if constexpr ( is_vector_bool_v<OBJ> ) {
217218
bool value {};
218-
SST_SER(value);
219+
opts = SerOption::none;
220+
SST_SER(value, opts);
219221
obj.push_back(value);
220222
}
221223
else { // std::vector, std::deque, std::list

src/sst/core/serialization/objectMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ class ObjectMapContainer : public ObjectMapWithChildren
820820
T* addr_;
821821

822822
public:
823-
bool isContainer() final { return true; }
823+
bool isContainer() override final { return true; }
824824

825825
std::string getType() override { return demangle_name(typeid(T).name()); }
826826

src/sst/core/ssthandler.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,9 +1129,7 @@ using SSTHandlerBaseNoArgs = SSTHandlerBase<returnT, void>;
11291129
* Handler class with user-data argument
11301130
*/
11311131
template <typename returnT, typename argT, typename classT, typename dataT = void>
1132-
class [[deprecated(
1133-
"Handler has been deprecated. Please use Handler2 instead as it supports checkpointing")]] SSTHandler :
1134-
public SSTHandlerBase<returnT, argT>
1132+
class SSTHandler : public SSTHandlerBase<returnT, argT>
11351133
{
11361134
private:
11371135
using PtrMember = returnT (classT::*)(argT, dataT);
@@ -1165,8 +1163,7 @@ class [[deprecated(
11651163
* Event Handler class with no user-data.
11661164
*/
11671165
template <typename returnT, typename argT, typename classT>
1168-
class [[deprecated("Handler has been deprecated. Please use Handler2 instead as it supports "
1169-
"checkpointing")]] SSTHandler<returnT, argT, classT, void> : public SSTHandlerBase<returnT, argT>
1166+
class SSTHandler<returnT, argT, classT, void> : public SSTHandlerBase<returnT, argT>
11701167
{
11711168
private:
11721169
using PtrMember = returnT (classT::*)(argT);
@@ -1194,9 +1191,7 @@ class [[deprecated("Handler has been deprecated. Please use Handler2 instead as
11941191
* Event Handler class with user-data argument
11951192
*/
11961193
template <typename returnT, typename classT, typename dataT = void>
1197-
class [[deprecated(
1198-
"Handler has been deprecated. Please use Handler2 instead as it supports checkpointing")]] SSTHandlerNoArgs :
1199-
public SSTHandlerBaseNoArgs<returnT>
1194+
class SSTHandlerNoArgs : public SSTHandlerBaseNoArgs<returnT>
12001195
{
12011196
private:
12021197
using PtrMember = returnT (classT::*)(dataT);
@@ -1230,8 +1225,7 @@ class [[deprecated(
12301225
* Event Handler class with no user-data.
12311226
*/
12321227
template <typename returnT, typename classT>
1233-
class [[deprecated("Handler has been deprecated. Please use Handler2 instead as it supports "
1234-
"checkpointing")]] SSTHandlerNoArgs<returnT, classT, void> : public SSTHandlerBaseNoArgs<returnT>
1228+
class SSTHandlerNoArgs<returnT, classT, void> : public SSTHandlerBaseNoArgs<returnT>
12351229
{
12361230
private:
12371231
using PtrMember = returnT (classT::*)();

0 commit comments

Comments
 (0)