Skip to content

Commit ce20250

Browse files
authored
Merge pull request #72909 from compnerd/cast
runtime: add an explicit cast for older C++ runtimes
2 parents c1f86bd + 269565c commit ce20250

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/public/runtime/Errors.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ reportOnCrash(uint32_t flags, const char *message)
313313
else
314314
current = ::strdup(message);
315315
} while (!std::atomic_compare_exchange_strong_explicit(&kFatalErrorMessage,
316-
&previous, current,
316+
&previous,
317+
static_cast<const char *>(current),
317318
std::memory_order_release,
318319
SWIFT_MEMORY_ORDER_CONSUME));
319320
#endif // SWIFT_HAVE_CRASHREPORTERCLIENT

0 commit comments

Comments
 (0)