add several noreturn statements

Found with clang's -Wmissing-noreturn

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-04-04 19:07:08 -07:00
committed by ridiculousfish
parent 202fe39d34
commit ca57bcbb00
3 changed files with 5 additions and 2 deletions

View File

@@ -1178,7 +1178,7 @@ class universal_notifier_shmem_poller_t : public universal_notifier_t {
}
#else // this class isn't valid on this system
public:
universal_notifier_shmem_poller_t() {
[[noreturn]] universal_notifier_shmem_poller_t() {
DIE("universal_notifier_shmem_poller_t cannot be used on this system");
}
#endif
@@ -1257,7 +1257,7 @@ class universal_notifier_notifyd_t : public universal_notifier_t {
}
#else // this class isn't valid on this system
public:
universal_notifier_notifyd_t() {
[[noreturn]] universal_notifier_notifyd_t() {
DIE("universal_notifier_notifyd_t cannot be used on this system");
}
#endif

View File

@@ -87,6 +87,7 @@ pgroup_provenance_t get_pgroup_provenance(const shared_ptr<job_t> &j,
/// This function is executed by the child process created by a call to fork(). It should be called
/// after \c child_setup_process. It calls execve to replace the fish process image with the command
/// specified in \c p. It never returns. Called in a forked child! Do not allocate memory, etc.
[[noreturn]]
static void safe_launch_process(process_t *p, const char *actual_cmd, const char *const *cargv,
const char *const *cenvv) {
UNUSED(p);
@@ -132,6 +133,7 @@ static void safe_launch_process(process_t *p, const char *actual_cmd, const char
/// This function is similar to launch_process, except it is not called after a fork (i.e. it only
/// calls exec) and therefore it can allocate memory.
[[noreturn]]
static void launch_process_nofork(env_stack_t &vars, process_t *p) {
ASSERT_IS_MAIN_THREAD();
ASSERT_IS_NOT_FORKED_CHILD();

View File

@@ -242,6 +242,7 @@ static void process_input(bool continuous_mode) {
}
/// Setup our environment (e.g., tty modes), process key strokes, then reset the environment.
[[noreturn]]
static void setup_and_process_keys(bool continuous_mode) {
set_interactive_session(session_interactivity_t::implied);
set_main_thread();