1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:54:45 -07:00

libmach: fix warnings.

Fixes #1706.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4413051
This commit is contained in:
Dave Cheney 2011-04-14 23:58:08 -04:00 committed by Russ Cox
parent c09af6631f
commit 29cf90a4ef
3 changed files with 4 additions and 4 deletions

View File

@ -1134,7 +1134,7 @@ copyu(Prog *p, Adr *v, Adr *s)
if(v->type == D_REG) {
if(v->reg <= REGEXT && v->reg > exregoffset)
return 2;
if(v->reg == REGARG)
if(v->reg == (uchar)REGARG)
return 2;
}
if(v->type == D_FREG)
@ -1152,7 +1152,7 @@ copyu(Prog *p, Adr *v, Adr *s)
case ATEXT: /* funny */
if(v->type == D_REG)
if(v->reg == REGARG)
if(v->reg == (uchar)REGARG)
return 3;
return 0;
}

View File

@ -317,7 +317,7 @@ zaddr(Biobuf *f, Adr *a, Sym *h[])
a->sym = h[c];
a->name = Bgetc(f);
if(a->reg < 0 || a->reg > NREG) {
if((schar)a->reg < 0 || a->reg > NREG) {
print("register out of range %d\n", a->reg);
Bputc(f, ALAST+1);
return; /* force real diagnostic */

View File

@ -215,7 +215,7 @@ processprog(Prog *p, int doautos)
{
if(p->kind == aNone)
return 1;
if(p->sym < 0 || p->sym >= NNAMES)
if((schar)p->sym < 0 || p->sym >= NNAMES)
return 0;
switch(p->kind)
{