Skip to content

Commit 0964a0d

Browse files
committed
CoreFoundation: explicitly cast to the proper fptr types
With the latest rebranch, the mismatched function pointer types raise an error rather than a warning. Explicitly cast to the expected function pointer type rather than ignoring the warning.
1 parent 9bcec05 commit 0964a0d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CoreFoundation/Parsing.subproj/CFXMLInterface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ _CFXMLDTDNodePtr _CFXMLParseDTDNode(const unsigned char* xmlString) {
11471147
xmlUnlinkNode(node);
11481148
} else if (dtd->notations) {
11491149
node = (xmlNodePtr)calloc(1, sizeof(_cfxmlNotation));
1150-
xmlHashScan((xmlNotationTablePtr)dtd->notations, &_CFXMLNotationScanner, (void*)node);
1150+
xmlHashScan((xmlNotationTablePtr)dtd->notations, (void (*)(void *, void *, const unsigned char *))&_CFXMLNotationScanner, (const unsigned char *)node);
11511151
}
11521152

11531153
return node;

CoreFoundation/RunLoop.subproj/CFRunLoop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ CF_EXPORT CFRunLoopRef _CFRunLoopGet0(_CFThreadRef t) {
17691769
#if _POSIX_THREADS
17701770
_CFSetTSD(__CFTSDKeyRunLoopCntr, (void *)(PTHREAD_DESTRUCTOR_ITERATIONS-1), (void (*)(void *))__CFFinalizeRunLoop);
17711771
#else
1772-
_CFSetTSD(__CFTSDKeyRunLoopCntr, 0, &__CFFinalizeRunLoop);
1772+
_CFSetTSD(__CFTSDKeyRunLoopCntr, 0, (void (* _Nullable)(void * _Nullable))&__CFFinalizeRunLoop);
17731773
#endif
17741774
}
17751775
}

0 commit comments

Comments
 (0)