1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:48:32 -06:00

runtime: remove unused parameter on runOpenDeferFrame

Found via unparam.

Change-Id: I21126405beaf0be84e14ac165ecb68aeb0c9c823
Reviewed-on: https://go-review.googlesource.com/c/go/+/427014
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: hopehook <hopehook@golangcn.org>
This commit is contained in:
Daniel Martí 2022-08-31 11:27:52 +01:00
parent dc629ec939
commit fbf452a89f

View File

@ -457,7 +457,7 @@ func deferreturn() {
return return
} }
if d.openDefer { if d.openDefer {
done := runOpenDeferFrame(gp, d) done := runOpenDeferFrame(d)
if !done { if !done {
throw("unfinished open-coded defers in deferreturn") throw("unfinished open-coded defers in deferreturn")
} }
@ -519,7 +519,7 @@ func Goexit() {
d.started = true d.started = true
d._panic = (*_panic)(noescape(unsafe.Pointer(&p))) d._panic = (*_panic)(noescape(unsafe.Pointer(&p)))
if d.openDefer { if d.openDefer {
done := runOpenDeferFrame(gp, d) done := runOpenDeferFrame(d)
if !done { if !done {
// We should always run all defers in the frame, // We should always run all defers in the frame,
// since there is no panic associated with this // since there is no panic associated with this
@ -744,7 +744,7 @@ func readvarintUnsafe(fd unsafe.Pointer) (uint32, unsafe.Pointer) {
// d. It normally processes all active defers in the frame, but stops immediately // d. It normally processes all active defers in the frame, but stops immediately
// if a defer does a successful recover. It returns true if there are no // if a defer does a successful recover. It returns true if there are no
// remaining defers to run in the frame. // remaining defers to run in the frame.
func runOpenDeferFrame(gp *g, d *_defer) bool { func runOpenDeferFrame(d *_defer) bool {
done := true done := true
fd := d.fd fd := d.fd
@ -881,7 +881,7 @@ func gopanic(e any) {
done := true done := true
if d.openDefer { if d.openDefer {
done = runOpenDeferFrame(gp, d) done = runOpenDeferFrame(d)
if done && !d._panic.recovered { if done && !d._panic.recovered {
addOneOpenDeferFrame(gp, 0, nil) addOneOpenDeferFrame(gp, 0, nil)
} }