From 9735a18addd6cc4a3d4f4dc7f573a726f25f2a61 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 30 Jan 2020 20:39:42 +0100 Subject: [PATCH] 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. --- src/proc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/proc.cpp b/src/proc.cpp index 3e2911179..fda626234 100644 --- a/src/proc.cpp +++ b/src/proc.cpp @@ -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)