Commit 29cf90a4 authored by Dave Cheney's avatar Dave Cheney Committed by Russ Cox

libmach: fix warnings.

Fixes #1706.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4413051
parent c09af663
......@@ -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;
}
......
......@@ -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 */
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment