From f1781bec3b60898ddde6f905bc94feeb8fdd4ade Mon Sep 17 00:00:00 2001 From: Fazlul Shahriar Date: Mon, 25 Apr 2011 12:14:30 -0400 Subject: [PATCH] 8g,8l: fix "set but not used" gcc error $ gcc --version gcc (GCC) 4.6.0 20110415 (prerelease) R=golang-dev, rsc1, rsc CC=golang-dev https://golang.org/cl/4442080 --- src/cmd/8g/ggen.c | 4 ---- src/cmd/8l/obj.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cmd/8g/ggen.c b/src/cmd/8g/ggen.c index 8db55249346..920725c3ea9 100644 --- a/src/cmd/8g/ggen.c +++ b/src/cmd/8g/ggen.c @@ -625,12 +625,8 @@ void cgen_div(int op, Node *nl, Node *nr, Node *res) { Node ax, dx, oldax, olddx; - int rax, rdx; Type *t; - rax = reg[D_AX]; - rdx = reg[D_DX]; - if(is64(nl->type)) fatal("cgen_div %T", nl->type); diff --git a/src/cmd/8l/obj.c b/src/cmd/8l/obj.c index d512304b4e1..2a38f7ef0aa 100644 --- a/src/cmd/8l/obj.c +++ b/src/cmd/8l/obj.c @@ -431,7 +431,7 @@ ldobj1(Biobuf *f, char *pkg, int64 len, char *pn) int32 ipc; Prog *p; int v, o, r, skip; - Sym *h[NSYM], *s, *di; + Sym *h[NSYM], *s; uint32 sig; int ntext; int32 eof; @@ -442,7 +442,6 @@ ldobj1(Biobuf *f, char *pkg, int64 len, char *pn) lastp = nil; ntext = 0; eof = Boffset(f) + len; - di = S; src[0] = 0;