From fbf452a89fe95b3a26069c6c5a43240798db2408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 31 Aug 2022 11:27:52 +0100 Subject: [PATCH] runtime: remove unused parameter on runOpenDeferFrame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found via unparam. Change-Id: I21126405beaf0be84e14ac165ecb68aeb0c9c823 Reviewed-on: https://go-review.googlesource.com/c/go/+/427014 Reviewed-by: Cherry Mui Reviewed-by: Michael Knyszek TryBot-Result: Gopher Robot Run-TryBot: Daniel Martí Reviewed-by: hopehook --- src/runtime/panic.go | 8 ++++---- 1 file 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) }