os: fix type check error in benchmark
os: fix type check error in benchmark

Previously, 's' was only written to, never read,
which is disallowed by the spec. cmd/compile
has a bug where it doesn't notice this when a
closure is involved, but go/types does notice,
which was making "go vet" fail.

This CL moves the variable into the closure
and also makes sure to use it.

Change-Id: I2d83fb6b5c1c9018df03533e966cbdf455f83bf9
Reviewed-on: https://go-review.googlesource.com/108556
Run-TryBot: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

golang/go,akutz/go,nawawi/go,akutz/go,CAFxX/go,CAFxX/go,cloudflare/go,golang/go,akutz/go,josharian/go,cloudflare/go,nawawi/go,josharian/go,akutz/go,golang/go,golang/go,cloudflare/go,CAFxX/go,akutz/go,CAFxX/go,akutz/go,nawawi/go,cloudflare/go,nawawi/go,nawawi/go,josharian/go,cloudflare/go,josharian/go,golang/go,josharian/go,CAFxX/go,josharian/go,nawawi/go,josharian/go,CAFxX/go,cloudflare/go,nawawi/go,golang/go,akutz/go,akutz/go,cloudflare/go,golang/go,josharian/go,nawawi/go,cloudflare/go,CAFxX/go,CAFxX/go,golang/go