Skip to content

Commit 4c6b877

Browse files
committed
Runloop: add a static assert
Add an assertion to ensure that we do not truncate the thread reference.
1 parent a7d1fdd commit 4c6b877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/RunLoop.subproj/CFSocket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2625,7 +2625,7 @@ static CFSocketRef _CFSocketCreateWithNative(CFAllocatorRef allocator, CFSocketN
26252625
#endif
26262626
pthread_create(&tid, &attr, __CFSocketManager, 0);
26272627
pthread_attr_destroy(&attr);
2628-
//warning CF: we dont actually know that a _CFThreadRef is the same size as void *
2628+
_Static_assert(sizeof(_CFThreadRef) == sizeof(void *), "_CFThreadRef is not pointer sized");
26292629
__CFSocketManagerThread = (void *)tid;
26302630
#elif DEPLOYMENT_TARGET_WINDOWS
26312631
unsigned tid;

0 commit comments

Comments
 (0)