Browse Source

MacOS X/clang found a new batch of warnings :)

Godzil 11 years ago
parent
commit
a05a174f40
4 changed files with 14 additions and 4 deletions
  1. 8 0
      util/ncgg/cgg.y
  2. 2 2
      util/ncgg/main.c
  3. 2 1
      util/ncgg/output.c
  4. 2 1
      util/opt/mktab.y

+ 8 - 0
util/ncgg/cgg.y

@@ -17,6 +17,11 @@
 #include "strlookup.h"
 #include <cgg_cg.h>
 #include <em_reg.h>
+#include "subr.h"
+#include "coerc.h"
+#include "hall.h"
+#include "error.h"
+#include "emlookup.h"
 
 extern int lineno;
 int instline,saveline;
@@ -39,6 +44,9 @@ int Xstackflag=0; /* set in coercions, moves, and tests. %1 means something
 		     different then.
 		   */
 
+/* From lexer */
+int yylex(void);
+
 struct varinfo *gen_inst(),*gen_move(),*gen_test(),*gen_preturn(),*gen_tlab();
 struct varinfo *gen_label(), *make_erase();
 expr_t make_expr(),ident_expr(),subreg_expr(),tokm_expr(),all_expr();

+ 2 - 2
util/ncgg/main.c

@@ -4,7 +4,7 @@
  */
 #include <stdlib.h>
 #include <stdio.h>
-
+#include <unistd.h>
 #include "param.h"
 #include "varinfo.h"
 
@@ -20,7 +20,7 @@
 void yyparse(void);
 
 char *filename;
-char *beg_sbrk;
+void *beg_sbrk;
 
 int main(int argc, char *argv[])
 {

+ 2 - 1
util/ncgg/output.c

@@ -51,6 +51,8 @@ FILE *code;
 short *lineset;
 int maxline;
 
+extern void *beg_sbrk;
+
 extern int nstrings;
 extern char *l_strings[];
 
@@ -922,7 +924,6 @@ void used(char *resource, int use, int max)
 
 void statistics()
 {
-	extern char *beg_sbrk,*sbrk();
 	extern int nnodes, maxempatlen,maxrule;
 
 	used("Registers",nregs,MAXREGS);

+ 2 - 1
util/opt/mktab.y

@@ -45,7 +45,8 @@ int CBO_instrs[] = {
 	/* don't add op_mli and op_mlu! */
 };
 
-
+int yylex(void);
+int lookup(int comm, int operator, int lnode, int rnode);
 void enter(char *name, int value);
 void yyerror(char *s);
 void printnodes();