summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Mark runcmd with attribute noreturn, since it doesn't return
When compiling with gcc version 12, this change also avoids the compiler warning "infinite recursion detected" for runcmd()
-rw-r--r--user/sh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/user/sh.c b/user/sh.c
index 83dd513..36245b3 100644
--- a/user/sh.c
+++ b/user/sh.c
@@ -52,6 +52,7 @@ struct backcmd {
int fork1(void); // Fork but panics on failure.
void panic(char*);
struct cmd *parsecmd(char*);
+void runcmd(struct cmd*) __attribute__((noreturn));
// Execute cmd. Never returns.
void