1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:14:41 -07:00

5c, 6c, 6l: fix Plan 9 build warnings

src/cmd/5c/reg.c:
. Added USED() attribute.

src/cmd/6c/cgen.c:
. Revised code around "REGARG" to resemble use in "8c" and
  consequently remove a warning.

src/cmd/6l/asm.c:
. Added USED() attributes.
. Removed an unnecessary assignment.

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4836045
This commit is contained in:
Lucio De Re 2011-08-16 14:22:08 -04:00 committed by Russ Cox
parent 93ecb5bb1b
commit c8c6e1961d
3 changed files with 7 additions and 7 deletions

View File

@ -66,6 +66,7 @@ rcmp(const void *a1, const void *a2)
void
regopt(Prog *p)
{
USED(p);
// TODO(kaib): optimizer disabled because it smashes R8 when running out of registers
// the disable is unconventionally here because the call is in common code shared by 5c/6c/8c
return;

View File

@ -930,9 +930,6 @@ cgen(Node *n, Node *nn)
return;
}
o = 0;
if(REGARG >= 0)
o = reg[REGARG];
gargs(r, &nod, &nod1);
if(l->addable < INDEXED) {
reglcgen(&nod, l, nn);
@ -941,9 +938,8 @@ cgen(Node *n, Node *nn)
regfree(&nod);
} else
gopcode(OFUNC, n->type, Z, l);
if(REGARG >= 0)
if(o != reg[REGARG])
reg[REGARG]--;
if(REGARG >= 0 && reg[REGARG])
reg[REGARG]--;
if(nn != Z) {
regret(&nod, n);
gmove(&nod, nn);

View File

@ -298,6 +298,9 @@ adddynrel(Sym *s, Reloc *r)
int
archreloc(Reloc *r, Sym *s, vlong *val)
{
USED(r);
USED(s);
USED(val);
return -1;
}
@ -859,7 +862,7 @@ asmb(void)
startva = INITTEXT - HEADR;
/* This null SHdr must appear before all others */
sh = newElfShdr(elfstr[ElfStrEmpty]);
newElfShdr(elfstr[ElfStrEmpty]);
/* program header info */
pph = newElfPhdr();