1
0
mirror of https://github.com/golang/go synced 2024-10-03 21:21:22 -06:00

silence gcc warnings

R=ken
OCL=16449
CL=16466
This commit is contained in:
Russ Cox 2008-10-03 16:23:02 -07:00
parent b8babed7c2
commit 45f4e38506
11 changed files with 13 additions and 21 deletions

View File

@ -117,8 +117,6 @@ void
allocparams(void) allocparams(void)
{ {
Dcl *d; Dcl *d;
Iter list;
Type *t;
Node *n; Node *n;
uint32 w; uint32 w;
@ -153,7 +151,6 @@ gen(Node *n, Label *labloop)
int32 lno; int32 lno;
Prog *scontin, *sbreak; Prog *scontin, *sbreak;
Prog *p1, *p2, *p3; Prog *p1, *p2, *p3;
Sym *s;
Node *l; Node *l;
Label *lab; Label *lab;
@ -723,7 +720,7 @@ void
cgen_call(Node *n, int proc) cgen_call(Node *n, int proc)
{ {
Type *t; Type *t;
Node nod, afun, regax; Node nod, afun;
if(n == N) if(n == N)
return; return;
@ -823,7 +820,7 @@ cgen_callret(Node *n, Node *res)
void void
cgen_aret(Node *n, Node *res) cgen_aret(Node *n, Node *res)
{ {
Node nod1, nod2; Node nod1;
Type *fp, *t; Type *fp, *t;
Iter flist; Iter flist;
@ -858,7 +855,6 @@ cgen_asop(Node *n)
{ {
Node n1, n2, n3, n4; Node n1, n2, n3, n4;
Node *nl, *nr; Node *nl, *nr;
int32 lno;
nl = n->left; nl = n->left;
nr = n->right; nr = n->right;
@ -1069,7 +1065,7 @@ void
cgen_div(int op, Node *nl, Node *nr, Node *res) cgen_div(int op, Node *nl, Node *nr, Node *res)
{ {
Node ax, dx, n3, tmpax, tmpdx; Node ax, dx, n3, tmpax, tmpdx;
int a, rax, rdx; int rax, rdx;
rax = reg[D_AX]; rax = reg[D_AX];
rdx = reg[D_DX]; rdx = reg[D_DX];

View File

@ -159,6 +159,7 @@ void gmove(Node*, Node*);
Prog* gins(int, Node*, Node*); Prog* gins(int, Node*, Node*);
int samaddr(Node*, Node*); int samaddr(Node*, Node*);
void naddr(Node*, Addr*); void naddr(Node*, Addr*);
void cgen_aret(Node*, Node*);
/* /*
* gsubr.c * gsubr.c

View File

@ -836,7 +836,7 @@ nodconst(&nodc, types[TUINT64], 1);
if(a == AMOVQ || if(a == AMOVQ ||
a == AMOVSD || a == AMOVSD ||
a == AMOVSS || 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)) if(samaddr(f, t))
return; return;
gins(a, f, t); gins(a, f, t);

View File

@ -316,9 +316,9 @@ Yconv(Fmt *fp)
p = str; p = str;
for(i=0; i<sconsize; i++) { for(i=0; i<sconsize; i++) {
c = a[i] & 0xff; c = a[i] & 0xff;
if(c >= 'a' && c <= 'z' || if((c >= 'a' && c <= 'z') ||
c >= 'A' && c <= 'Z' || (c >= 'A' && c <= 'Z') ||
c >= '0' && c <= '9') { (c >= '0' && c <= '9')) {
*p++ = c; *p++ = c;
continue; continue;
} }

View File

@ -163,6 +163,7 @@ dumpobj(void)
Bterm(bout); Bterm(bout);
} }
void
Bputdot(Biobuf *b) Bputdot(Biobuf *b)
{ {
// put out middle dot · // put out middle dot ·

View File

@ -9,7 +9,6 @@ void
convlit(Node *n, Type *t) convlit(Node *n, Type *t)
{ {
int et; int et;
Node *n1;
if(n == N || t == T) if(n == N || t == T)
return; return;

View File

@ -640,8 +640,6 @@ addvar(Node *n, Type *t, int ctxt)
{ {
Dcl *r, *d; Dcl *r, *d;
Sym *s; Sym *s;
Type *ot;
Node *on;
int gen; int gen;
if(n==N || n->sym == S || n->op != ONAME || t == T) if(n==N || n->sym == S || n->op != ONAME || t == T)
@ -965,9 +963,8 @@ mixed:
void void
fninit(Node *n) fninit(Node *n)
{ {
Node *done, *any; Node *done;
Node *a, *fn, *r; Node *a, *fn, *r;
Iter iter;
uint32 h; uint32 h;
Sym *s; Sym *s;

View File

@ -591,6 +591,8 @@ Type* ptrto(Type*);
Node* cleanidlist(Node*); Node* cleanidlist(Node*);
Node* syslook(char*, int); Node* syslook(char*, int);
Node* treecopy(Node*); Node* treecopy(Node*);
int isselect(Node*);
void tempname(Node*, Type*);
Type** getthis(Type*); Type** getthis(Type*);
Type** getoutarg(Type*); Type** getoutarg(Type*);

View File

@ -200,7 +200,6 @@ importfile(Val *f)
Biobuf *imp; Biobuf *imp;
char *file; char *file;
int32 c; int32 c;
char *p;
int len; int len;
if(f->ctype != CTSTR) { if(f->ctype != CTSTR) {

View File

@ -484,7 +484,7 @@ mpmovecfix(Mpint *a, vlong c)
void void
mpdivmodfixfix(Mpint *q, Mpint *r, Mpint *n, Mpint *d) mpdivmodfixfix(Mpint *q, Mpint *r, Mpint *n, Mpint *d)
{ {
int i, nn, dn; int i;
mpmovefixfix(r, n); mpmovefixfix(r, n);
mpmovecfix(q, 0); mpmovecfix(q, 0);

View File

@ -780,7 +780,6 @@ Lconv(Fmt *fp)
if(n == 0) if(n == 0)
strcat(str, "<epoch>"); strcat(str, "<epoch>");
ret:
return fmtstrcpy(fp, str); return fmtstrcpy(fp, str);
} }
@ -1458,8 +1457,6 @@ signame(Type *t)
{ {
Sym *s, *ss; Sym *s, *ss;
char *e; char *e;
Type *t1;
int n;
char buf[NSYMB]; char buf[NSYMB];
if(t == T) if(t == T)