diff options
| author | Frans Kaashoek <kaashoek@mit.edu> | 2022-08-02 09:38:22 -0400 |
|---|---|---|
| committer | Frans Kaashoek <kaashoek@mit.edu> | 2022-08-02 09:38:22 -0400 |
| commit | 1b02b08db18210f2c1efb4e184c482a06f690fbd (patch) | |
| tree | d6ad2983ddc8509251ada83b1988f1788b508a83 | |
| parent | 84a1bdb5aad37f9c0eb94e5917ee813e043b6d8f (diff) | |
| download | xv6-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |
