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()
This commit is contained in:
Frans Kaashoek 2022-08-02 09:38:22 -04:00
parent 84a1bdb5aa
commit 1b02b08db1

View file

@ -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