Skip to content

Commit 42a7ff6

Browse files
hughbegparker42
authored andcommitted
Fix reinterpret cast warning of unsigned to void* in Metadata.h (#6814)
1 parent d7c3939 commit 42a7ff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Runtime/Metadata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3442,7 +3442,7 @@ inline int swift_getFunctionPointerExtraInhabitantIndex(void * const* src) {
34423442
inline void swift_storeFunctionPointerExtraInhabitant(void **dest, int index) {
34433443
// This must be consistent with the storeFunctionPointerExtraInhabitantIndex
34443444
// implementation in IRGen's ExtraInhabitants.cpp.
3445-
*dest = reinterpret_cast<void*>((unsigned) index);
3445+
*dest = reinterpret_cast<void*>(static_cast<uintptr_t>(index));
34463446
}
34473447

34483448
/// Return the number of extra inhabitants in a function pointer.

0 commit comments

Comments
 (0)