Эх сурвалжийг харах

fix(sh): ignore -Winfinity-recursion

greatbridf 2 жил өмнө
parent
commit
b6dbdcae1e

+ 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)