mirror of
https://github.com/golang/go
synced 2024-11-25 16:07:56 -07:00
libmach: fix warnings.
Fixes #1706. R=adg, rsc CC=golang-dev https://golang.org/cl/4413051
This commit is contained in:
parent
c09af6631f
commit
29cf90a4ef
@ -1134,7 +1134,7 @@ copyu(Prog *p, Adr *v, Adr *s)
|
|||||||
if(v->type == D_REG) {
|
if(v->type == D_REG) {
|
||||||
if(v->reg <= REGEXT && v->reg > exregoffset)
|
if(v->reg <= REGEXT && v->reg > exregoffset)
|
||||||
return 2;
|
return 2;
|
||||||
if(v->reg == REGARG)
|
if(v->reg == (uchar)REGARG)
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if(v->type == D_FREG)
|
if(v->type == D_FREG)
|
||||||
@ -1152,7 +1152,7 @@ copyu(Prog *p, Adr *v, Adr *s)
|
|||||||
|
|
||||||
case ATEXT: /* funny */
|
case ATEXT: /* funny */
|
||||||
if(v->type == D_REG)
|
if(v->type == D_REG)
|
||||||
if(v->reg == REGARG)
|
if(v->reg == (uchar)REGARG)
|
||||||
return 3;
|
return 3;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ zaddr(Biobuf *f, Adr *a, Sym *h[])
|
|||||||
a->sym = h[c];
|
a->sym = h[c];
|
||||||
a->name = Bgetc(f);
|
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);
|
print("register out of range %d\n", a->reg);
|
||||||
Bputc(f, ALAST+1);
|
Bputc(f, ALAST+1);
|
||||||
return; /* force real diagnostic */
|
return; /* force real diagnostic */
|
||||||
|
@ -215,7 +215,7 @@ processprog(Prog *p, int doautos)
|
|||||||
{
|
{
|
||||||
if(p->kind == aNone)
|
if(p->kind == aNone)
|
||||||
return 1;
|
return 1;
|
||||||
if(p->sym < 0 || p->sym >= NNAMES)
|
if((schar)p->sym < 0 || p->sym >= NNAMES)
|
||||||
return 0;
|
return 0;
|
||||||
switch(p->kind)
|
switch(p->kind)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user