]> Cypherpunks repositories - gostls13.git/commitdiff
silence gcc warnings
authorRuss Cox <rsc@golang.org>
Fri, 3 Oct 2008 23:23:02 +0000 (16:23 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 3 Oct 2008 23:23:02 +0000 (16:23 -0700)
R=ken
OCL=16449
CL=16466

src/cmd/6g/gen.c
src/cmd/6g/gg.h
src/cmd/6g/gsubr.c
src/cmd/6g/list.c
src/cmd/6g/obj.c
src/cmd/gc/const.c
src/cmd/gc/dcl.c
src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/gc/mparith2.c
src/cmd/gc/subr.c

index 3c1c92947a63a81bc8ea814ec58bf56ddaabbbcc..d96c4e6a3c83c35e65f6ee1b2058f80c17ebdb92 100644 (file)
@@ -117,8 +117,6 @@ void
 allocparams(void)
 {
        Dcl *d;
-       Iter list;
-       Type *t;
        Node *n;
        uint32 w;
 
@@ -153,7 +151,6 @@ gen(Node *n, Label *labloop)
        int32 lno;
        Prog *scontin, *sbreak;
        Prog *p1, *p2, *p3;
-       Sym *s;
        Node *l;
        Label *lab;
 
@@ -723,7 +720,7 @@ void
 cgen_call(Node *n, int proc)
 {
        Type *t;
-       Node nod, afun, regax;
+       Node nod, afun;
 
        if(n == N)
                return;
@@ -823,7 +820,7 @@ cgen_callret(Node *n, Node *res)
 void
 cgen_aret(Node *n, Node *res)
 {
-       Node nod1, nod2;
+       Node nod1;
        Type *fp, *t;
        Iter flist;
 
@@ -858,7 +855,6 @@ cgen_asop(Node *n)
 {
        Node n1, n2, n3, n4;
        Node *nl, *nr;
-       int32 lno;
 
        nl = n->left;
        nr = n->right;
@@ -1069,7 +1065,7 @@ void
 cgen_div(int op, Node *nl, Node *nr, Node *res)
 {
        Node ax, dx, n3, tmpax, tmpdx;
-       int a, rax, rdx;
+       int rax, rdx;
 
        rax = reg[D_AX];
        rdx = reg[D_DX];
index c1d244d992acf8f710fe56e6ab0fa6e542014b49..e7fccd2d2d7c3560463813cf976dc3300fb6e2b1 100644 (file)
@@ -159,6 +159,7 @@ void        gmove(Node*, Node*);
 Prog*  gins(int, Node*, Node*);
 int    samaddr(Node*, Node*);
 void   naddr(Node*, Addr*);
+void   cgen_aret(Node*, Node*);
 
 /*
  * gsubr.c
index 0256100a837678591d418ccd6a4eca46cb4732ef..36936e3df8db2c3e2574febce48f1681a287409b 100644 (file)
@@ -836,7 +836,7 @@ nodconst(&nodc, types[TUINT64], 1);
        if(a == AMOVQ ||
           a == AMOVSD ||
           a == AMOVSS ||
-          a == AMOVL && f->type->width == t->type->width)      /* TO DO: check AMOVL */
+          (a == AMOVL && f->type->width == t->type->width))    /* TO DO: check AMOVL */
                if(samaddr(f, t))
                        return;
        gins(a, f, t);
index 8f764a62234e5df753757105bb96c3cf3d83ba02..b5e298b108dd30648a7588211141bfe702a11ca4 100644 (file)
@@ -316,9 +316,9 @@ Yconv(Fmt *fp)
        p = str;
        for(i=0; i<sconsize; i++) {
                c = a[i] & 0xff;
-               if(c >= 'a' && c <= 'z' ||
-                  c >= 'A' && c <= 'Z' ||
-                  c >= '0' && c <= '9') {
+               if((c >= 'a' && c <= 'z') ||
+                  (c >= 'A' && c <= 'Z') ||
+                  (c >= '0' && c <= '9')) {
                        *p++ = c;
                        continue;
                }
index b33dcc32885481eeb2ac9e72adbe4c4d7c1b1890..ccbf29fb3cb5ccc471a97883b13b8232cdc82150 100644 (file)
@@ -163,6 +163,7 @@ dumpobj(void)
        Bterm(bout);
 }
 
+void
 Bputdot(Biobuf *b)
 {
        // put out middle dot ยท
index 649b548a83efc88ffbb8729baeed429c7f85169a..a22cbbc13079fc84e0446dbc51a47c83ad5557a5 100644 (file)
@@ -9,7 +9,6 @@ void
 convlit(Node *n, Type *t)
 {
        int et;
-       Node *n1;
 
        if(n == N || t == T)
                return;
index 0fdae33786f1134c3c2c47563e1701cf4dc5f0ee..a96d58a33c0e56edbc05dc2c5bd485571db960a1 100644 (file)
@@ -640,8 +640,6 @@ addvar(Node *n, Type *t, int ctxt)
 {
        Dcl *r, *d;
        Sym *s;
-       Type *ot;
-       Node *on;
        int gen;
 
        if(n==N || n->sym == S || n->op != ONAME || t == T)
@@ -965,9 +963,8 @@ mixed:
 void
 fninit(Node *n)
 {
-       Node *done, *any;
+       Node *done;
        Node *a, *fn, *r;
-       Iter iter;
        uint32 h;
        Sym *s;
 
index 7b337fbc06dd5cd7d4cb93388d9a2a0bd4c3b18f..fc22c40472dd8e6864f1180abb10605de037f5b8 100644 (file)
@@ -591,6 +591,8 @@ Type*       ptrto(Type*);
 Node*  cleanidlist(Node*);
 Node*  syslook(char*, int);
 Node*  treecopy(Node*);
+int    isselect(Node*);
+void   tempname(Node*, Type*);
 
 Type** getthis(Type*);
 Type** getoutarg(Type*);
index 94917d5ff1dda92244ed8b11c67de941f4fed19d..df02fc2f80dd67dc753b7502eaf7eec8a52c0b9b 100644 (file)
@@ -200,7 +200,6 @@ importfile(Val *f)
        Biobuf *imp;
        char *file;
        int32 c;
-       char *p;
        int len;
 
        if(f->ctype != CTSTR) {
index b819bd4006067f4af518c191b2409e5e222bd10c..67bbd932288600dfb2529417f215210939a2987e 100644 (file)
@@ -484,7 +484,7 @@ mpmovecfix(Mpint *a, vlong c)
 void
 mpdivmodfixfix(Mpint *q, Mpint *r, Mpint *n, Mpint *d)
 {
-       int i, nn, dn;
+       int i;
 
        mpmovefixfix(r, n);
        mpmovecfix(q, 0);
index 7d017d66747c47e32968c231eebda80d918f2df4..df6ea8144c352dbb3a2569fbcd4e97a9d1032815 100644 (file)
@@ -780,7 +780,6 @@ Lconv(Fmt *fp)
        if(n == 0)
                strcat(str, "<epoch>");
 
-ret:
        return fmtstrcpy(fp, str);
 }
 
@@ -1458,8 +1457,6 @@ signame(Type *t)
 {
        Sym *s, *ss;
        char *e;
-       Type *t1;
-       int n;
        char buf[NSYMB];
 
        if(t == T)