From 64b891d5feee55e567aa51c567232682511fdf13 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Mon, 8 Jul 2024 10:24:44 +0100 Subject: [PATCH] [Runtime] Add missing cast. Apparently we're missing a cast in `_swift_initRuntimePath()`. Previously this code was accidentally not being used, which is why we hadn't noticed it. rdar://131294724 --- stdlib/public/runtime/Paths.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/public/runtime/Paths.cpp b/stdlib/public/runtime/Paths.cpp index 7d748404e3a51..c247043521f2d 100644 --- a/stdlib/public/runtime/Paths.cpp +++ b/stdlib/public/runtime/Paths.cpp @@ -532,7 +532,8 @@ _swift_tryAuxExePath(const char *name, const char *path, ...) void _swift_initRuntimePath(void *) { #if APPLE_OS_SYSTEM - const char *path = dyld_image_path_containing_address(_swift_initRuntimePath); + const char *path = + dyld_image_path_containing_address((const void *)_swift_initRuntimePath); // No need to ::strdup() this, as the return value is guaranteed to remain // valid as long as the library is loaded.