summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2022-08-02 09:38:22 -0400
committerFrans Kaashoek <[email protected]>2022-08-02 09:38:22 -0400
commit1b02b08db18210f2c1efb4e184c482a06f690fbd (patch)
treed6ad2983ddc8509251ada83b1988f1788b508a83
parent84a1bdb5aad37f9c0eb94e5917ee813e043b6d8f (diff)
downloadxv6-labs-1b02b08db18210f2c1efb4e184c482a06f690fbd.tar.gz
xv6-labs-1b02b08db18210f2c1efb4e184c482a06f690fbd.tar.bz2
xv6-labs-1b02b08db18210f2c1efb4e184c482a06f690fbd.zip
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