Skip to content

Commit cc37cfe

Browse files
committed
11;rgb:0000/0000/0000# This is the 1st commit message:
Add -Wmissing-noreturn and [[noreturn]] to more functions
1 parent 8d54573 commit cc37cfe

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ esac
6262

6363
SST_CHECK_PICKY
6464
AS_IF([test "x$use_picky" = "xyes"],
65-
[WARNFLAGS="-Wall -Wextra -Wvla -Wnon-virtual-dtor -Wsuggest-override"],
65+
[WARNFLAGS="-Wall -Wextra -Wvla -Wnon-virtual-dtor -Wsuggest-override -Wmissing-noreturn"],
6666
[WARNFLAGS=""])
6767
CFLAGS="$CFLAGS $WARNFLAGS"
6868
CXXFLAGS="$CXXFLAGS $WARNFLAGS"

src/sst/core/model/element_python.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ SST_ELI_DEFINE_INFO_EXTERN(SSTElementPythonModule)
3636

3737
// Utility function to parse the python exceptions from loading
3838
// modules and format and print them on abort.
39+
[[noreturn]]
3940
static void abortOnPyErr(uint32_t line, const char* file, const char* func, uint32_t exit_code, const char* format, ...)
4041
__attribute__((format(printf, 5, 6)));
4142

src/sst/core/serialization/serializable_base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ class serializable_type
143143
#define ImplementVirtualSerializable(obj) \
144144
\
145145
public: \
146+
[[noreturn]] \
146147
static void throw_exc() \
147148
{ \
148149
::SST::Core::Serialization::serializable_base::serializable_abort(__LINE__, __FILE__, __FUNCTION__, #obj); \
@@ -165,6 +166,7 @@ public:
165166
#define NotSerializable(obj) \
166167
\
167168
public: \
169+
[[noreturn]] \
168170
static void throw_exc() \
169171
{ \
170172
::SST::Core::Serialization::serializable_base::serializable_abort(__LINE__, __FILE__, __FUNCTION__, #obj); \

0 commit comments

Comments
 (0)