diff options
| author | Dmitri Shuralyov <dmitshur@golang.org> | 2025-09-10 10:41:04 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-09-10 08:28:56 -0700 |
| commit | 9650c97d0fad719b372159a6ca59e722a6e487ce (patch) | |
| tree | cb352852525cce9e9b72a168f20508cca38fc576 /src/syscall | |
| parent | f1c4b860d4cf5d3164fbb5a26bafc36f109d9bdc (diff) | |
| download | go-9650c97d0fad719b372159a6ca59e722a6e487ce.tar.xz | |
syscall: remove unreachable code
Reported by go vet:
$ go vet syscall
# syscall_test
# [syscall_test]
syscall/env_unix_test.go:100:4: unreachable code
The TestVetStdlib test in golang.org/x/tools/go/analysis/unitchecker
also ran into this.
Fixes #73998.
Change-Id: I7f2842a42835a38163433a09a3311be9c30f8a14
Cq-Include-Trybots: luci.golang.try:x_tools-gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/702415
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/syscall')
| -rw-r--r-- | src/syscall/env_unix_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/syscall/env_unix_test.go b/src/syscall/env_unix_test.go index 9a6cdcbf9e..de9935a40a 100644 --- a/src/syscall/env_unix_test.go +++ b/src/syscall/env_unix_test.go @@ -96,7 +96,9 @@ func TestClearenv(t *testing.T) { defer func() { ret = recover() }() - panic(nil) + if true { + panic(nil) + } return "should not return" } |
