From 76535df3248b7f4e489d1555f27cedd151cd1a50 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 26 Jul 2017 16:51:39 +0200 Subject: [PATCH] lib:texpect: Avoid some compiler warnings Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- lib/texpect/texpect.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/texpect/texpect.c b/lib/texpect/texpect.c index b553de8ca5c..dd786705e8e 100644 --- a/lib/texpect/texpect.c +++ b/lib/texpect/texpect.c @@ -434,6 +434,9 @@ int main(int argc, const char **argv) switch (pid) { case -1: err(1, "Failed to fork"); + + /* Never reached */ + return 1; case 0: if(setsid()<0) @@ -448,6 +451,9 @@ int main(int argc, const char **argv) /* texpect [] */ execvp(program, program_args); err(1, "Failed to exec: %s", program); + + /* Never reached */ + return 1; default: close(slave); { @@ -462,4 +468,7 @@ int main(int argc, const char **argv) return eval_parent(pid); } + + /* Never reached */ + return 1; }