Commit 2bddbf5e authored by Anthony Martin's avatar Anthony Martin

cmd/8g, cmd/dist, cmd/gc: fix warnings on Plan 9

cmd/8g/gsubr.c: unreachable code
cmd/8g/reg.c: overspecifed class
cmd/dist/plan9.c: unused parameter
cmd/gc/fmt.c: stkdelta is now a vlong
cmd/gc/racewalk.c: used but not set

R=golang-dev, seed, rsc
CC=golang-dev
https://golang.org/cl/7067052
parent 60826e0b
...@@ -1515,7 +1515,7 @@ floatmove(Node *f, Node *t) ...@@ -1515,7 +1515,7 @@ floatmove(Node *f, Node *t)
{ {
Node r1, r2, t1, t2, tlo, thi, con, f0, f1, ax, dx, cx; Node r1, r2, t1, t2, tlo, thi, con, f0, f1, ax, dx, cx;
Type *cvt; Type *cvt;
int a, ft, tt; int ft, tt;
Prog *p1, *p2, *p3; Prog *p1, *p2, *p3;
ft = simsimtype(f->type); ft = simsimtype(f->type);
...@@ -1711,9 +1711,6 @@ floatmove(Node *f, Node *t) ...@@ -1711,9 +1711,6 @@ floatmove(Node *f, Node *t)
return; return;
} }
gins(a, f, t);
return;
hard: hard:
// requires register intermediate // requires register intermediate
regalloc(&r1, cvt, t); regalloc(&r1, cvt, t);
......
...@@ -1815,7 +1815,7 @@ hash32to16(uint32 h) ...@@ -1815,7 +1815,7 @@ hash32to16(uint32 h)
* sees, which lets it do a better job and makes it less likely to turn * sees, which lets it do a better job and makes it less likely to turn
* itself off. * itself off.
*/ */
void static void
fixtemp(Prog *firstp) fixtemp(Prog *firstp)
{ {
static uint8 counts[1<<16]; // A hash table to count variable occurences. static uint8 counts[1<<16]; // A hash table to count variable occurences.
......
...@@ -755,6 +755,7 @@ xsamefile(char *f1, char *f2) ...@@ -755,6 +755,7 @@ xsamefile(char *f1, char *f2)
int int
xtryexecfunc(void (*f)(void)) xtryexecfunc(void (*f)(void))
{ {
USED(f);
return 0; // suffice for now return 0; // suffice for now
} }
......
...@@ -289,7 +289,7 @@ Jconv(Fmt *fp) ...@@ -289,7 +289,7 @@ Jconv(Fmt *fp)
fmtprint(fp, " l(%d)", n->lineno); fmtprint(fp, " l(%d)", n->lineno);
if(!c && n->xoffset != BADWIDTH) if(!c && n->xoffset != BADWIDTH)
fmtprint(fp, " x(%lld%+d)", n->xoffset, n->stkdelta); fmtprint(fp, " x(%lld%+lld)", n->xoffset, n->stkdelta);
if(n->class != 0) { if(n->class != 0) {
s = ""; s = "";
......
...@@ -219,6 +219,7 @@ racewalknode(Node **np, NodeList **init, int wr, int skip) ...@@ -219,6 +219,7 @@ racewalknode(Node **np, NodeList **init, int wr, int skip)
racewalknode(&n->left, init, 0, 0); racewalknode(&n->left, init, 0, 0);
if(istype(n->left->type, TMAP)) { if(istype(n->left->type, TMAP)) {
// crashes on len(m[0]) or len(f()) // crashes on len(m[0]) or len(f())
SET(n1);
USED(n1); USED(n1);
/* /*
n1 = nod(OADDR, n->left, N); n1 = nod(OADDR, n->left, N);
......
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