]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/5g, cmd/5l, cmd/ld: Small adjustments for the Plan 9 native tools
authorLucio De Re <lucio.dere@gmail.com>
Fri, 4 Jan 2013 16:02:49 +0000 (11:02 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 4 Jan 2013 16:02:49 +0000 (11:02 -0500)
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

src/cmd/5g/ggen.c
src/cmd/5g/reg.c
src/cmd/5l/asm.c
src/cmd/ld/pe.c

index 840d55a95ce7c19462f0df6419915cdf81d04567..40ef0bd7bcfc73c2148e00d7a00906dd9ced9d2c 100644 (file)
@@ -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);
 
index 14cda5148812005da44c6cbbab0ddcff728bb9a4..5f7ed2e88dfc3812fb9473e1174d1c8df8a0b081 100644 (file)
@@ -207,7 +207,6 @@ regopt(Prog *firstp)
                return;
        }
 
-       r1 = R;
        firstr = R;
        lastr = R;
 
index f62c927e24464f717662e2026f5ee86013794f48..1937d899ab8ac2d7a7c711820bbfc21121d1c0f9 100644 (file)
@@ -913,6 +913,7 @@ asmb(void)
                        }
                        phsh(pnote, sh);
                }
+               USED(resoff);
 
                elfphload(&segtext);
                elfphload(&segdata);
index d263562aec6ae3708f401125f5ef7e229384412b..f2903ba0f922d46790ad9343c6a3cfc31aa36dac 100644 (file)
@@ -536,6 +536,7 @@ addexcept(IMAGE_SECTION_HEADER *text)
        uvlong n;
        Sym *sym;
 
+       USED(text);
        if(thechar != '6')
                return;