From patchwork Fri Oct 8 20:33:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [gccgo] Remove some write-only variables From: Ian Taylor X-Patchwork-Id: 67280 Message-Id: To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Date: Fri, 08 Oct 2010 13:33:01 -0700 This patch removes some write-only variables in libgo, detected by mainline gcc. Committed to gccgo branch. Ian diff -r 7f20885a93b2 libgo/runtime/go-go.c --- a/libgo/runtime/go-go.c Fri Sep 24 17:15:07 2010 -0700 +++ b/libgo/runtime/go-go.c Fri Oct 08 13:30:26 2010 -0700 @@ -435,8 +435,6 @@ me = pthread_self (); for (p = __go_all_thread_ids; p != NULL; p = p->next) { - _Bool isme = 0; - if (p->tentative) { /* The goroutine function and argument can be allocated on @@ -458,7 +456,6 @@ if (pthread_equal (me, p->id)) { - isme = 1; next_segment = NULL; next_sp = NULL; initial_sp = NULL; @@ -485,7 +482,6 @@ if (pthread_equal (me, p->id)) { - isme = 1; uintptr_t top = (uintptr_t) m->gc_sp; uintptr_t bottom = (uintptr_t) ⊤ if (top < bottom) diff -r 7f20885a93b2 libgo/runtime/go-unwind.c --- a/libgo/runtime/go-unwind.c Fri Sep 24 17:15:07 2010 -0700 +++ b/libgo/runtime/go-unwind.c Fri Oct 08 13:30:26 2010 -0700 @@ -157,11 +157,10 @@ __go_panic_defer->__exception = hdr; - _Unwind_Reason_Code code; #ifdef __USING_SJLJ_EXCEPTIONS__ - code = _Unwind_SjLj_RaiseException (hdr); + _Unwind_SjLj_RaiseException (hdr); #else - code = _Unwind_RaiseException (hdr); + _Unwind_RaiseException (hdr); #endif /* Raising an exception should not return. */