Skip to content

Commit ccd0cc8

Browse files
committed
Add -Wmissing-noreturn and [[noreturn]] to more functions
1 parent 8d54573 commit ccd0cc8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class serializable_type
143143
#define ImplementVirtualSerializable(obj) \
144144
\
145145
public: \
146-
static void throw_exc() \
146+
[[noreturn]] static void throw_exc() \
147147
{ \
148148
::SST::Core::Serialization::serializable_base::serializable_abort(__LINE__, __FILE__, __FUNCTION__, #obj); \
149149
} \
@@ -165,7 +165,7 @@ public:
165165
#define NotSerializable(obj) \
166166
\
167167
public: \
168-
static void throw_exc() \
168+
[[noreturn]] static void throw_exc() \
169169
{ \
170170
::SST::Core::Serialization::serializable_base::serializable_abort(__LINE__, __FILE__, __FUNCTION__, #obj); \
171171
} \

0 commit comments

Comments
 (0)