From 63e86f792167e6cc2e9600d00b184a3c83fe7498 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 5 Nov 2020 17:30:39 +0100 Subject: Added warning flags and fixed them :) --- apps/cc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/cc.c') diff --git a/apps/cc.c b/apps/cc.c index 6e989f9..6b571b1 100644 --- a/apps/cc.c +++ b/apps/cc.c @@ -5,6 +5,7 @@ #include #include #include +#include #include 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(); -- cgit v1.2.3