From: Austin Clements Date: Mon, 17 Oct 2022 15:29:34 +0000 (-0400) Subject: runtime: fix missing error print in TestCgoSigfwd X-Git-Tag: go1.20rc1~474 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=767df51b4dc4d952fd3f3ff14dffdf5fd8cffb4e;p=gostls13.git runtime: fix missing error print in TestCgoSigfwd The result of the call to fmt.Errorf was unused. It was clearly intending to print the message, not simply construct an error. Change-Id: I14856214c521a51fe4b45690e6c35fbb17e66577 Reviewed-on: https://go-review.googlesource.com/c/go/+/443375 Run-TryBot: Austin Clements TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills --- diff --git a/src/runtime/testdata/testprogcgo/sigfwd.go b/src/runtime/testdata/testprogcgo/sigfwd.go index b66616db36..f6a0c031d7 100644 --- a/src/runtime/testdata/testprogcgo/sigfwd.go +++ b/src/runtime/testdata/testprogcgo/sigfwd.go @@ -61,7 +61,7 @@ var nilPtr *byte func f() (ret bool) { defer func() { if recover() == nil { - fmt.Errorf("ERROR: couldn't raise SIGSEGV in Go.") + fmt.Fprintf(os.Stderr, "ERROR: couldn't raise SIGSEGV in Go\n") C.exit(2) } ret = true