diff --git a/src/env_universal_common.cpp b/src/env_universal_common.cpp index 423a53953..4be75f9ec 100644 --- a/src/env_universal_common.cpp +++ b/src/env_universal_common.cpp @@ -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 diff --git a/src/exec.cpp b/src/exec.cpp index bcffd6ef8..793905c4b 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -87,6 +87,7 @@ pgroup_provenance_t get_pgroup_provenance(const shared_ptr &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(); diff --git a/src/fish_key_reader.cpp b/src/fish_key_reader.cpp index 39a9e88a5..f3bef3ecc 100644 --- a/src/fish_key_reader.cpp +++ b/src/fish_key_reader.cpp @@ -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();