diff options
author | Marvin Borner | 2020-11-05 17:30:39 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-05 17:32:53 +0100 |
commit | 63e86f792167e6cc2e9600d00b184a3c83fe7498 (patch) | |
tree | 31e2d583be3ebf34782f6ec37f6c524657c40686 /apps/cc.c | |
parent | 916fca2161e76de67a5106b90baf00a57f2a0512 (diff) |
Added warning flags and fixed them :)
Diffstat (limited to 'apps/cc.c')
-rw-r--r-- | apps/cc.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -5,6 +5,7 @@ #include <def.h> #include <mem.h> #include <print.h> +#include <str.h> #include <sys.h> char *p, *lp, // current position in source code @@ -744,7 +745,7 @@ void stmt() int main(int argc, char **argv) { - int bt, ty, poolsz, *idmain; + int bt, poolsz, *idmain; int *pc, *sp, *bp, a, cycle; // vm registers int i, *t; // temps @@ -777,8 +778,8 @@ int main(int argc, char **argv) memset(e, 0, poolsz); memset(data, 0, poolsz); - p = "char else enum if int return sizeof while " - "open read close printf malloc free memset memcmp exit void main"; + p = strdup("char else enum if int return sizeof while " + "open read close printf malloc free memset memcmp exit void main"); i = Char; while (i <= While) { next(); |