diff mbox

libgo patch committed: Remove unused variable

Message ID mcrha2bkfbk.fsf@iant-glaptop.roam.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor July 20, 2014, 7:20 p.m. UTC
This patch from Peter Collingbourne removes an unused variable from
libgo.  The variable is set but never used, and gccgo was not giving an
error about such cases.  I will shortly commit a gccgo patch to detect
this case.  This patch bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian
diff mbox

Patch

diff -r cc0233176c9b libgo/go/reflect/value.go
--- a/libgo/go/reflect/value.go	Sun Jul 20 08:12:13 2014 -0700
+++ b/libgo/go/reflect/value.go	Sun Jul 20 12:19:22 2014 -0700
@@ -434,13 +434,12 @@ 
 	// Get function pointer, type.
 	t := v.typ
 	var (
-		fn       unsafe.Pointer
-		rcvr     Value
-		rcvrtype *rtype
+		fn   unsafe.Pointer
+		rcvr Value
 	)
 	if v.flag&flagMethod != 0 {
 		rcvr = v
-		rcvrtype, t, fn = methodReceiver(op, v, int(v.flag)>>flagMethodShift)
+		_, t, fn = methodReceiver(op, v, int(v.flag)>>flagMethodShift)
 	} else if v.flag&flagIndir != 0 {
 		fn = *(*unsafe.Pointer)(v.ptr)
 	} else {