From: Lucio De Re Date: Fri, 4 Jan 2013 16:02:49 +0000 (-0500) Subject: cmd/5g, cmd/5l, cmd/ld: Small adjustments for the Plan 9 native tools X-Git-Tag: go1.1rc2~1482 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=62dfa9c47d33368400cfa1f0b4fade7d047992ee;p=gostls13.git cmd/5g, cmd/5l, cmd/ld: Small adjustments for the Plan 9 native tools A few USED(xxx) additions and a couple of deletions of variable initialisations that go unused. One questionable correction, mirrored in 8l/asm.c, where the result of invocation of a function shouldn't be used. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6736054 --- diff --git a/src/cmd/5g/ggen.c b/src/cmd/5g/ggen.c index 840d55a95c..40ef0bd7bc 100644 --- a/src/cmd/5g/ggen.c +++ b/src/cmd/5g/ggen.c @@ -543,6 +543,7 @@ cgen_shift(int op, int bounded, Node *nl, Node *nr, Node *res) Type *tr; uvlong sc; + USED(bounded); if(nl->type->width > 4) fatal("cgen_shift %T", nl->type); diff --git a/src/cmd/5g/reg.c b/src/cmd/5g/reg.c index 14cda51488..5f7ed2e88d 100644 --- a/src/cmd/5g/reg.c +++ b/src/cmd/5g/reg.c @@ -207,7 +207,6 @@ regopt(Prog *firstp) return; } - r1 = R; firstr = R; lastr = R; diff --git a/src/cmd/5l/asm.c b/src/cmd/5l/asm.c index f62c927e24..1937d899ab 100644 --- a/src/cmd/5l/asm.c +++ b/src/cmd/5l/asm.c @@ -913,6 +913,7 @@ asmb(void) } phsh(pnote, sh); } + USED(resoff); elfphload(&segtext); elfphload(&segdata); diff --git a/src/cmd/ld/pe.c b/src/cmd/ld/pe.c index d263562aec..f2903ba0f9 100644 --- a/src/cmd/ld/pe.c +++ b/src/cmd/ld/pe.c @@ -536,6 +536,7 @@ addexcept(IMAGE_SECTION_HEADER *text) uvlong n; Sym *sym; + USED(text); if(thechar != '6') return;