]> Cypherpunks repositories - gostls13.git/commitdiff
5l: fix set but not used warnings
authorDave Cheney <dave@cheney.net>
Sat, 21 May 2011 15:00:53 +0000 (08:00 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 21 May 2011 15:00:53 +0000 (08:00 -0700)
R=rsc, iant
CC=golang-dev
https://golang.org/cl/4538083

src/cmd/5l/asm.c
src/cmd/5l/obj.c
src/cmd/5l/span.c

index 3463a82b3fe8165c8064c018198b96eb24be791f..9e9c2c1ebb391cc57f4580840eadf29c118bd8c0 100644 (file)
@@ -295,15 +295,12 @@ asmb(void)
 {
        int32 t;
        int a, dynsym;
-       uint32 va, fo, w, symo, startva, elfsymo, elfstro, elfsymsize;
-       int strtabsize;
+       uint32 fo, symo, startva, elfsymo, elfstro, elfsymsize;
        ElfEhdr *eh;
        ElfPhdr *ph, *pph;
        ElfShdr *sh;
        Section *sect;
 
-       strtabsize = 0;
-
        if(debug['v'])
                Bprint(&bso, "%5.2f asmb\n", cputime());
        Bflush(&bso);
@@ -467,9 +464,7 @@ asmb(void)
                /* elf arm */
                eh = getElfEhdr();
                fo = HEADR;
-               va = INITTEXT;
                startva = INITTEXT - fo;        /* va of byte 0 of file */
-               w = textsize;
                
                /* This null SHdr must appear before all others */
                sh = newElfShdr(elfstr[ElfStrEmpty]);
index 29c3b3d83d20edbe5ba058d8266004bb5fa7ac3a..96ba0010fa25463c6550b99027646107fdce9f67 100644 (file)
@@ -412,7 +412,7 @@ ldobj1(Biobuf *f, char *pkg, int64 len, char *pn)
 {
        int32 ipc;
        Prog *p;
-       Sym *h[NSYM], *s, *di;
+       Sym *h[NSYM], *s;
        int v, o, r, skip;
        uint32 sig;
        char *name;
@@ -424,7 +424,6 @@ ldobj1(Biobuf *f, char *pkg, int64 len, char *pn)
        lastp = nil;
        ntext = 0;
        eof = Boffset(f) + len;
-       di = S;
        src[0] = 0;
 
 newloop:
index be6b3767ef054e26875c12c089e0a6f34fccc4e5..4067f1a3270962c0c0bd0798818b577f0e0f49a2 100644 (file)
@@ -168,7 +168,6 @@ span(void)
        Optab *o;
        int m, bflag, i, v;
        int32 c, otxt, out[6];
-       int lastthumb = -1;
        Section *sect;
        uchar *bp;
 
@@ -187,7 +186,6 @@ span(void)
                p->pc = c;
                cursym->value = c;
 
-               lastthumb = thumb;
                autosize = p->to.offset + 4;
                if(p->from.sym != S)
                        p->from.sym->value = c;