Bläddra i källkod

fix(sh): ignore -Winfinity-recursion

greatbridf 1 år sedan
förälder
incheckning
b6dbdcae1e
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      user-space-program/sh.c

+ 3 - 0
user-space-program/sh.c

@@ -56,6 +56,8 @@ int fork1(void);  // Fork but panics on failure.
 void panic(char*);
 struct cmd *parsecmd(char*);
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winfinite-recursion"
 // Execute cmd.  Never returns.
 void
 runcmd(struct cmd *cmd)
@@ -133,6 +135,7 @@ runcmd(struct cmd *cmd)
   }
   _exit(0);
 }
+#pragma GCC diagnostic pop
 
 int
 getcmd(char *buf, int nbuf)