Commit b015af41 authored by David du Colombier's avatar David du Colombier Committed by Russ Cox

cmd/ld: fix warnings on Plan 9

src/cmd/ld/lib.c:1379 set and not used: p
src/cmd/ld/lib.c:1426 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1437 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1456 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1477 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1459 set and not used: started

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11615044
parent e97d677b
...@@ -1376,7 +1376,7 @@ addvarint(Sym *s, uint32 val) ...@@ -1376,7 +1376,7 @@ addvarint(Sym *s, uint32 val)
p = s->p + s->np - n; p = s->p + s->np - n;
for(v = val; v >= 0x80; v >>= 7) for(v = val; v >= 0x80; v >>= 7)
*p++ = v | 0x80; *p++ = v | 0x80;
*p++ = v; *p = v;
} }
// funcpctab appends to dst a pc-value table mapping the code in func to the values // funcpctab appends to dst a pc-value table mapping the code in func to the values
...@@ -1423,7 +1423,7 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*, ...@@ -1423,7 +1423,7 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*,
if(val == oldval && started) { if(val == oldval && started) {
val = valfunc(func, val, p, 1, arg); val = valfunc(func, val, p, 1, arg);
if(debug['O']) if(debug['O'])
Bprint(&bso, "%6llux %6s %P\n", p->pc, "", p); Bprint(&bso, "%6llux %6s %P\n", (vlong)p->pc, "", p);
continue; continue;
} }
...@@ -1434,7 +1434,7 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*, ...@@ -1434,7 +1434,7 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*,
if(p->link && p->link->pc == p->pc) { if(p->link && p->link->pc == p->pc) {
val = valfunc(func, val, p, 1, arg); val = valfunc(func, val, p, 1, arg);
if(debug['O']) if(debug['O'])
Bprint(&bso, "%6llux %6s %P\n", p->pc, "", p); Bprint(&bso, "%6llux %6s %P\n", (vlong)p->pc, "", p);
continue; continue;
} }
...@@ -1453,11 +1453,9 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*, ...@@ -1453,11 +1453,9 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*,
// where the 0x80 bit indicates that the integer continues. // where the 0x80 bit indicates that the integer continues.
if(debug['O']) if(debug['O'])
Bprint(&bso, "%6llux %6d %P\n", p->pc, val, p); Bprint(&bso, "%6llux %6d %P\n", (vlong)p->pc, val, p);
if(!started) if(started) {
started = 1;
else {
addvarint(dst, (p->pc - pc) / MINLC); addvarint(dst, (p->pc - pc) / MINLC);
pc = p->pc; pc = p->pc;
} }
...@@ -1474,7 +1472,7 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*, ...@@ -1474,7 +1472,7 @@ funcpctab(Sym *dst, Sym *func, char *desc, int32 (*valfunc)(Sym*, int32, Prog*,
if(started) { if(started) {
if(debug['O']) if(debug['O'])
Bprint(&bso, "%6llux done\n", func->value+func->size); Bprint(&bso, "%6llux done\n", (vlong)func->value+func->size);
addvarint(dst, (func->value+func->size - pc) / MINLC); addvarint(dst, (func->value+func->size - pc) / MINLC);
addvarint(dst, 0); // terminator addvarint(dst, 0); // terminator
} }
......
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