runtime/cgo: fix clang mach_port_t cast warning

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>
This commit is contained in:
Roland Shoemaker 2024-03-21 08:50:04 -07:00 committed by Gopher Robot
parent b4f37e18b6
commit 8705675614
1 changed files with 1 additions and 1 deletions

View 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
}