mirror of
https://github.com/golang/go.git
synced 2025-10-19 19:13:18 +00:00
syscall: actually remove unreachable code
CL 702415 claimed to remove unreachable code, but in reality merely hid it from vet's unreachable pass. Since the unreachable code isn't serving an active role in the test, do remove it to simplify code. Change-Id: I5905b8b566e4ca013bdd1202d1492e3eae6a5ede Reviewed-on: https://go-review.googlesource.com/c/go/+/702575 Reviewed-by: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
c349582344
commit
7d562b8460
1 changed files with 1 additions and 4 deletions
|
@ -96,11 +96,8 @@ func TestClearenv(t *testing.T) {
|
|||
defer func() {
|
||||
ret = recover()
|
||||
}()
|
||||
if true { // defeat vet's unreachable pass
|
||||
panic(nil)
|
||||
}
|
||||
return "should not return"
|
||||
}
|
||||
|
||||
// Allow panic(nil).
|
||||
if err := syscall.Setenv("GODEBUG", "panicnil=1"); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue