From 5d39af9d9bac91b84b9944b1edffc6fb332747fa Mon Sep 17 00:00:00 2001 From: Daniel Martí Date: Tue, 15 Aug 2017 21:15:26 +0100 Subject: all: remove some unused result params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of these are return values that were part of a receiving parameter, so they're still accessible. A few others are not, but those have never had a use. Found with github.com/mvdan/unparam, after Kevin Burke's suggestion that the tool should also warn about unused result parameters. Change-Id: Id8b5ed89912a99db22027703a88bd94d0b292b8b Reviewed-on: https://go-review.googlesource.com/55910 Run-TryBot: Daniel Martí TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/testing/benchmark.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/testing') diff --git a/src/testing/benchmark.go b/src/testing/benchmark.go index 0a08cca7b3..d592afbf87 100644 --- a/src/testing/benchmark.go +++ b/src/testing/benchmark.go @@ -238,7 +238,7 @@ var labelsOnce sync.Once // run executes the benchmark in a separate goroutine, including all of its // subbenchmarks. b must not have subbenchmarks. -func (b *B) run() BenchmarkResult { +func (b *B) run() { labelsOnce.Do(func() { fmt.Fprintf(b.w, "goos: %s\n", runtime.GOOS) fmt.Fprintf(b.w, "goarch: %s\n", runtime.GOARCH) @@ -253,7 +253,6 @@ func (b *B) run() BenchmarkResult { // Running func Benchmark. b.doBench() } - return b.result } func (b *B) doBench() BenchmarkResult { -- cgit v1.3-5-g9baa