diff options
| author | Daniel Martí <mvdan@mvdan.cc> | 2022-08-31 11:27:52 +0100 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2022-09-06 17:05:15 +0000 |
| commit | fbf452a89fe95b3a26069c6c5a43240798db2408 (patch) | |
| tree | 43700455f11c5cdd51c82d6a40ac9e2749f564b0 /src/runtime/panic.go | |
| parent | dc629ec939c006aca7a8d60a176253057b28e10c (diff) | |
| download | go-fbf452a89fe95b3a26069c6c5a43240798db2408.tar.xz | |
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>
Diffstat (limited to 'src/runtime/panic.go')
| -rw-r--r-- | src/runtime/panic.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 4fadbfc2e0..92ef96882f 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -457,7 +457,7 @@ func deferreturn() { return } if d.openDefer { - done := runOpenDeferFrame(gp, d) + done := runOpenDeferFrame(d) if !done { throw("unfinished open-coded defers in deferreturn") } @@ -519,7 +519,7 @@ func Goexit() { d.started = true d._panic = (*_panic)(noescape(unsafe.Pointer(&p))) if d.openDefer { - done := runOpenDeferFrame(gp, d) + done := runOpenDeferFrame(d) if !done { // We should always run all defers in the frame, // 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 // if a defer does a successful recover. It returns true if there are no // remaining defers to run in the frame. -func runOpenDeferFrame(gp *g, d *_defer) bool { +func runOpenDeferFrame(d *_defer) bool { done := true fd := d.fd @@ -881,7 +881,7 @@ func gopanic(e any) { done := true if d.openDefer { - done = runOpenDeferFrame(gp, d) + done = runOpenDeferFrame(d) if done && !d._panic.recovered { addOneOpenDeferFrame(gp, 0, nil) } |
