From: Roland Shoemaker Date: Thu, 21 Mar 2024 15:50:04 +0000 (-0700) Subject: runtime/cgo: fix clang mach_port_t cast warning X-Git-Tag: go1.23rc1~803 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=87056756141798b4dfd51dcaaa3e4ce63633a884;p=gostls13.git 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 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI --- diff --git a/src/runtime/cgo/gcc_signal_ios_arm64.c b/src/runtime/cgo/gcc_signal_ios_arm64.c index 87055e9422..3872f62de1 100644 --- a/src/runtime/cgo/gcc_signal_ios_arm64.c +++ b/src/runtime/cgo/gcc_signal_ios_arm64.c @@ -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 }