]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: fix clang mach_port_t cast warning
authorRoland Shoemaker <roland@golang.org>
Thu, 21 Mar 2024 15:50:04 +0000 (08:50 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 21 Mar 2024 21:04:22 +0000 (21:04 +0000)
Converting *void directly to mach_port_t causes newer clang to throw a
void-pointer-to-int-cast warning/error.

Change-Id: I709955d4678bed3f690a8337ce85fd8678d217bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/573415
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/runtime/cgo/gcc_signal_ios_arm64.c

index 87055e9422432a762ad098cbde46de0109c877d4..3872f62de130755301121b57586773cd741f1a4b 100644 (file)
@@ -168,7 +168,7 @@ mach_exception_handler(void *port)
 {
        // Calls catch_exception_raise.
        extern boolean_t exc_server();
-       mach_msg_server(exc_server, 2048, (mach_port_t)port, 0);
+       mach_msg_server(exc_server, 2048, (mach_port_t)(uintptr_t)port, 0);
        abort(); // never returns
 }