From: Dmitri Shuralyov Date: Wed, 10 Sep 2025 19:08:27 +0000 (-0400) Subject: syscall: actually remove unreachable code X-Git-Tag: go1.26rc1~901 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7d562b8460a210ad9d0b65a44fbfb71d2ea81789;p=gostls13.git 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 LUCI-TryBot-Result: Go LUCI Reviewed-by: Mark Freeman Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov --- diff --git a/src/syscall/env_unix_test.go b/src/syscall/env_unix_test.go index b44b5b1e17..a005060609 100644 --- a/src/syscall/env_unix_test.go +++ b/src/syscall/env_unix_test.go @@ -96,10 +96,7 @@ func TestClearenv(t *testing.T) { defer func() { ret = recover() }() - if true { // defeat vet's unreachable pass - panic(nil) - } - return "should not return" + panic(nil) } // Allow panic(nil).