removed some lint complaints
authorceriel <none@none>
Tue, 28 Jun 1988 14:41:02 +0000 (14:41 +0000)
committerceriel <none@none>
Tue, 28 Jun 1988 14:41:02 +0000 (14:41 +0000)
16 files changed:
mach/arm/top/Makefile
mach/m68020/top/Makefile
mach/m68k2/top/Makefile
mach/pdp/top/Makefile
mach/proto/ncg/codegen.c
mach/proto/ncg/compute.c
mach/proto/ncg/fillem.c
mach/proto/ncg/gencode.c
mach/proto/ncg/glosym.c
mach/proto/ncg/main.c
mach/proto/ncg/regvar.c
mach/proto/ncg/salloc.c
mach/proto/ncg/subr.c
mach/proto/top/Makefile
mach/proto/top/top.c
mach/vax4/top/Makefile

index 6648418..3701f05 100644 (file)
@@ -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
index 6648418..3701f05 100644 (file)
@@ -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
index 6648418..3701f05 100644 (file)
@@ -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
index 6648418..3701f05 100644 (file)
@@ -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
index 72ffee5..6922301 100644 (file)
@@ -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:
index d308543..eb75f93 100644 (file)
@@ -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));
index 6f4543d..0c7bdc8 100644 (file)
@@ -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);
index c33f492..7d62a38 100644 (file)
@@ -19,6 +19,8 @@ static char rcsid[] = "$Header$";
  * Author: Hans van Staveren
  */
 
+extern char    *sprintf();
+
 string mystrcpy();
 
 FILE *codefile;
index 3c8309a..6641fa5 100644 (file)
@@ -15,6 +15,7 @@ static char rcsid[] = "$Header$";
  */
 
 extern string myalloc();
+extern char *strcpy();
 
 glosym_p glolist= (glosym_p) 0;
 
index e6f6c0b..a778d6f 100644 (file)
@@ -14,6 +14,7 @@ static char rcsid[] = "$Header$";
 
 char *progname;
 extern char startupcode[];
+extern unsigned codegen();
 int maxply=1;
 #ifndef NDEBUG
 int Debug=0;
index 2e1f374..5ae2416 100644 (file)
@@ -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++) {
index 2291231..4512182 100644 (file)
@@ -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++)
index b697111..fd558b4 100644 (file)
@@ -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: ");
index 6648418..3701f05 100644 (file)
@@ -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
index a3adb18..f72e478 100644 (file)
@@ -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 */
index 6648418..3701f05 100644 (file)
@@ -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