ceriel 36 лет назад
Родитель
Сommit
8e9dce7bec

+ 1 - 1
mach/arm/top/Makefile

@@ -4,7 +4,7 @@ PREFLAGS=-I.
 PFLAGS=
 CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
 LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
 CDIR=$(EMHOME)/mach/proto/top
 CFILES=$(CDIR)/top.c $(CDIR)/queue.c
 OFILES=top.o queue.o

+ 1 - 1
mach/m68020/top/Makefile

@@ -4,7 +4,7 @@ PREFLAGS=-I.
 PFLAGS=
 CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
 LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
 CDIR=$(EMHOME)/mach/proto/top
 CFILES=$(CDIR)/top.c $(CDIR)/queue.c
 OFILES=top.o queue.o

+ 1 - 1
mach/m68k2/top/Makefile

@@ -4,7 +4,7 @@ PREFLAGS=-I.
 PFLAGS=
 CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
 LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
 CDIR=$(EMHOME)/mach/proto/top
 CFILES=$(CDIR)/top.c $(CDIR)/queue.c
 OFILES=top.o queue.o

+ 1 - 1
mach/pdp/top/Makefile

@@ -4,7 +4,7 @@ PREFLAGS=-I.
 PFLAGS=
 CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
 LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
 CDIR=$(EMHOME)/mach/proto/top
 CFILES=$(CDIR)/top.c $(CDIR)/queue.c
 OFILES=top.o queue.o

+ 5 - 5
mach/proto/ncg/codegen.c

@@ -354,7 +354,7 @@ if(Debug>1) fprintf(stderr,"Pattern too long, %d with only %d items on stack\n",
 			cp = findcoerc((token_p) 0, &machsets[tokexp[i]]);
 			if (cp==0) {
 				for (j=0;j<nregneeded;j++)
-					myfree(regls[j]);
+					myfree((string) (regls[j]));
 #ifndef ALLOW_NEXTEM
 				assert(!toplevel);
 				BROKE();
@@ -416,15 +416,15 @@ if (Debug > 1) fprintf(stderr, "cost after coercions: %u\n", t);
 			mincost = t;
 			besttup = tup;
 		} else
-			myfree(tup);
+			myfree((string) tup);
 		RESTST;
 	}
 	FREEST;
 	for (i=0;i<nregneeded;i++)
-		myfree(regls[i]);
+		myfree((string)(regls[i]));
 	if (totalcost+mincost>costlimit) {
 		if (besttup)
-			myfree(besttup);
+			myfree((string)besttup);
 normalfailed:	if (stackpad!=tokpatlen) {
 			if (stackpad) {
 				if (costlimit<MAXINT)
@@ -443,7 +443,7 @@ normalfailed:	if (stackpad!=tokpatlen) {
 	}
 	for (i=0;i<nregneeded;i++)
 		totalcost += docoerc(regtp[i],regcp[i],ply,toplevel,besttup->p_rar[i]);
-	myfree(besttup);
+	myfree((string)besttup);
 	break;
     }
     case DO_TOSTACK:

+ 5 - 3
mach/proto/ncg/compute.c

@@ -19,6 +19,8 @@ static char rcsid[] = "$Header$";
  * Author: Hans van Staveren
  */
 
+extern char	*sprintf();
+
 #define LLEAF 01
 #define LDEF  02
 #define RLEAF 04
@@ -101,9 +103,9 @@ string tostring(n) register word n; {
 	char buf[25];
 
 	if (n>=-20 && n<=20 && (n&1)==0) {
-		if (digstr[(n>>1)+10][0]==0)
-			sprintf(digstr[(n>>1)+10],WRD_FMT,n);
-		return(digstr[(n>>1)+10]);
+		if (digstr[((int)n>>1)+10][0]==0)
+			sprintf(digstr[((int)n>>1)+10],WRD_FMT,n);
+		return(digstr[((int)n>>1)+10]);
 	}
 	sprintf(buf,WRD_FMT,n);
 	return(mystrcpy(buf));

+ 4 - 2
mach/proto/ncg/fillem.c

@@ -29,6 +29,8 @@ static char rcsid2[] = "$Header$";
  * Author: Hans van Staveren
  */
 
+extern char	*sprintf();
+
 #ifndef newplb			/* retrofit for older mach.h */
 #define newplb newilb
 #endif
@@ -197,7 +199,7 @@ dopseudo() {
 	word romcont[MAXROM+1];
 	int nromwords;
 	int rombit,rommask;
-	unsigned dummy,stackupto();
+	unsigned stackupto();
 
 	if (nextispseu==0 || nemlines>0)
 		error("No table entry for %d",emlines[0].em_instr);
@@ -206,7 +208,7 @@ dopseudo() {
 	case sp_ilb1:
 	case sp_ilb2:
 		swtxt();
-		dummy = stackupto(&fakestack[stackheight-1],maxply,TRUE);
+		/* dummy = */stackupto(&fakestack[stackheight-1],maxply,TRUE);
 		cleanregs();
 		strarg(savetab1);
 		newilb(argstr);

+ 2 - 0
mach/proto/ncg/gencode.c

@@ -19,6 +19,8 @@ static char rcsid[] = "$Header$";
  * Author: Hans van Staveren
  */
 
+extern char	*sprintf();
+
 string mystrcpy();
 
 FILE *codefile;

+ 1 - 0
mach/proto/ncg/glosym.c

@@ -15,6 +15,7 @@ static char rcsid[] = "$Header$";
  */
 
 extern string myalloc();
+extern char *strcpy();
 
 glosym_p glolist= (glosym_p) 0;
 

+ 1 - 0
mach/proto/ncg/main.c

@@ -14,6 +14,7 @@ static char rcsid[] = "$Header$";
 
 char *progname;
 extern char startupcode[];
+extern unsigned codegen();
 int maxply=1;
 #ifndef NDEBUG
 int Debug=0;

+ 1 - 1
mach/proto/ncg/regvar.c

@@ -133,7 +133,7 @@ unlinkregs() {
 
 	for(rvlp=rvlist;rvlp!=0;rvlp=t) {
 		t=rvlp->rv_next;
-		myfree(rvlp);
+		myfree((string)rvlp);
 	}
 	rvlist=0;
 	for (rvtyp=reg_any;rvtyp<=reg_float;rvtyp++) {

+ 2 - 2
mach/proto/ncg/salloc.c

@@ -34,7 +34,7 @@ string malloc();
 string myalloc(size) {
 	register string p;
 
-	p = (string) malloc(size);
+	p = (string) malloc((unsigned)size);
 	if (p==0)
 		fatal("Out of memory");
 	return(p);
@@ -82,7 +82,7 @@ garbage_collect() {
 
 	if (nstab<THRESHOLD)
 		return;
-	qsort(stab,nstab,sizeof (char *),compar);
+	qsort((char *)stab,nstab,sizeof (char *),compar);
 	for (i=0;i<nstab;i++)
 		used[i]= FALSE;
 	for(emlp=emlines;emlp<emlines+nemlines;emlp++)

+ 3 - 1
mach/proto/ncg/subr.c

@@ -600,7 +600,7 @@ c3_p findcoerc(tp,tep) token_p tp; set_p tep; {
 			}
 			if (curreglist->rl_n != 0)
 				return(cp);
-			myfree(curreglist);
+			myfree((string)curreglist);
 		}
 	}
 	return(0);      /* nothing found */
@@ -613,6 +613,7 @@ itokcost() {
 		tdp->t_cost.ct_space = costcalc(tdp->t_cost);
 }
 
+/*VARARGS1*/
 error(s,a1,a2,a3,a4,a5,a6,a7,a8) char *s; {
 
 	fprintf(stderr,"Error: ");
@@ -625,6 +626,7 @@ error(s,a1,a2,a3,a4,a5,a6,a7,a8) char *s; {
 	exit(-1);
 }
 
+/*VARARGS1*/
 fatal(s,a1,a2,a3,a4,a5,a6,a7,a8) char *s; {
 
 	fprintf(stderr,"Fatal: ");

+ 1 - 1
mach/proto/top/Makefile

@@ -4,7 +4,7 @@ PREFLAGS=-I.
 PFLAGS=
 CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
 LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
 CDIR=$(EMHOME)/mach/proto/top
 CFILES=$(CDIR)/top.c $(CDIR)/queue.c
 OFILES=top.o queue.o

+ 4 - 0
mach/proto/top/top.c

@@ -15,6 +15,10 @@ extern instr_p newinstr();
 extern instr_p read_instr();
 extern instr_p gen_instr();
 extern char * malloc();
+extern char *strcat();
+extern char *strcpy();
+extern char *sprintf();
+extern char *strncpy();
 
 struct variable var[NRVARS+1];
 struct variable ANY;  /* ANY symbol matching any instruction */

+ 1 - 1
mach/vax4/top/Makefile

@@ -4,7 +4,7 @@ PREFLAGS=-I.
 PFLAGS=
 CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
 LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
 CDIR=$(EMHOME)/mach/proto/top
 CFILES=$(CDIR)/top.c $(CDIR)/queue.c
 OFILES=top.o queue.o