mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 23:11:14 -03:00
add several noreturn statements
Found with clang's -Wmissing-noreturn Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
ridiculousfish
parent
202fe39d34
commit
ca57bcbb00
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user