From e64951e1d3cced3574943998b02181a0a10b7aaf Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 28 Jun 1988 14:41:02 +0000 Subject: [PATCH] removed some lint complaints --- mach/arm/top/Makefile | 2 +- mach/m68020/top/Makefile | 2 +- mach/m68k2/top/Makefile | 2 +- mach/pdp/top/Makefile | 2 +- mach/proto/ncg/codegen.c | 10 +++++----- mach/proto/ncg/compute.c | 8 +++++--- mach/proto/ncg/fillem.c | 6 ++++-- mach/proto/ncg/gencode.c | 2 ++ mach/proto/ncg/glosym.c | 1 + mach/proto/ncg/main.c | 1 + mach/proto/ncg/regvar.c | 2 +- mach/proto/ncg/salloc.c | 4 ++-- mach/proto/ncg/subr.c | 4 +++- mach/proto/top/Makefile | 2 +- mach/proto/top/top.c | 4 ++++ mach/vax4/top/Makefile | 2 +- 16 files changed, 34 insertions(+), 20 deletions(-) diff --git a/mach/arm/top/Makefile b/mach/arm/top/Makefile index 6648418fd..3701f051c 100644 --- a/mach/arm/top/Makefile +++ b/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 diff --git a/mach/m68020/top/Makefile b/mach/m68020/top/Makefile index 6648418fd..3701f051c 100644 --- a/mach/m68020/top/Makefile +++ b/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 diff --git a/mach/m68k2/top/Makefile b/mach/m68k2/top/Makefile index 6648418fd..3701f051c 100644 --- a/mach/m68k2/top/Makefile +++ b/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 diff --git a/mach/pdp/top/Makefile b/mach/pdp/top/Makefile index 6648418fd..3701f051c 100644 --- a/mach/pdp/top/Makefile +++ b/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 diff --git a/mach/proto/ncg/codegen.c b/mach/proto/ncg/codegen.c index 72ffee56f..692230133 100644 --- a/mach/proto/ncg/codegen.c +++ b/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 1) fprintf(stderr, "cost after coercions: %u\n", t); mincost = t; besttup = tup; } else - myfree(tup); + myfree((string) tup); RESTST; } FREEST; for (i=0;icostlimit) { if (besttup) - myfree(besttup); + myfree((string)besttup); normalfailed: if (stackpad!=tokpatlen) { if (stackpad) { if (costlimitp_rar[i]); - myfree(besttup); + myfree((string)besttup); break; } case DO_TOSTACK: diff --git a/mach/proto/ncg/compute.c b/mach/proto/ncg/compute.c index d30854357..eb75f93e2 100644 --- a/mach/proto/ncg/compute.c +++ b/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)); diff --git a/mach/proto/ncg/fillem.c b/mach/proto/ncg/fillem.c index 6f4543d60..0c7bdc819 100644 --- a/mach/proto/ncg/fillem.c +++ b/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); diff --git a/mach/proto/ncg/gencode.c b/mach/proto/ncg/gencode.c index c33f492ec..7d62a381b 100644 --- a/mach/proto/ncg/gencode.c +++ b/mach/proto/ncg/gencode.c @@ -19,6 +19,8 @@ static char rcsid[] = "$Header$"; * Author: Hans van Staveren */ +extern char *sprintf(); + string mystrcpy(); FILE *codefile; diff --git a/mach/proto/ncg/glosym.c b/mach/proto/ncg/glosym.c index 3c8309ade..6641fa502 100644 --- a/mach/proto/ncg/glosym.c +++ b/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; diff --git a/mach/proto/ncg/main.c b/mach/proto/ncg/main.c index e6f6c0b3a..a778d6fb0 100644 --- a/mach/proto/ncg/main.c +++ b/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; diff --git a/mach/proto/ncg/regvar.c b/mach/proto/ncg/regvar.c index 2e1f37454..5ae24164d 100644 --- a/mach/proto/ncg/regvar.c +++ b/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++) { diff --git a/mach/proto/ncg/salloc.c b/mach/proto/ncg/salloc.c index 22912311b..45121822b 100644 --- a/mach/proto/ncg/salloc.c +++ b/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 (nstabrl_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: "); diff --git a/mach/proto/top/Makefile b/mach/proto/top/Makefile index 6648418fd..3701f051c 100644 --- a/mach/proto/top/Makefile +++ b/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 diff --git a/mach/proto/top/top.c b/mach/proto/top/top.c index a3adb180f..f72e4787d 100644 --- a/mach/proto/top/top.c +++ b/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 */ diff --git a/mach/vax4/top/Makefile b/mach/vax4/top/Makefile index 6648418fd..3701f051c 100644 --- a/mach/vax4/top/Makefile +++ b/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 -- 2.34.1