Always return a value, even in unreachable code

To placate dumb compilers, we sometimes have to include code that will
never be executed.

Should fix the build when -Werror=return-type is in effect.
This commit is contained in:
Fabian Homborg 2020-01-30 20:39:42 +01:00
parent 70195164d4
commit 9735a18add

View File

@ -265,7 +265,12 @@ bool process_t::is_internal() const {
case process_type_t::external:
case process_type_t::exec:
return false;
default:
assert(false && "The fish developers forgot to include a process_t. Please report a bug");
return true;
}
assert(false && "process_t::is_internal: Total logic failure, universe is broken. Please replace universe and retry.");
return true;
}
job_t::job_t(job_id_t job_id, const properties_t &props, const job_lineage_t &lineage)