]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused parameter on runOpenDeferFrame
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 31 Aug 2022 10:27:52 +0000 (11:27 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 6 Sep 2022 17:05:15 +0000 (17:05 +0000)
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>
src/runtime/panic.go

index 4fadbfc2e07ee7bcaaa8a176311bf6d30fb7bfb5..92ef96882fad8627bf1e03a21d4332a7cd041b65 100644 (file)
@@ -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)
                        }