Skip to content

CoreFoundation: explicitly cast to the proper fptr types #4689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

compnerd
Copy link
Member

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.

@compnerd
Copy link
Member Author

@compnerd
Copy link
Member Author

@swift-ci please test

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conversions themselves look fine. I think we can get without needing to cast _CFXMLNotationScanner. It's only used in this one place, so changing it to accept a const xmlChar* should be pretty straight-forward.

The other cast with in the RunLoop looks fine. Perhaps we should typedef the destructor type and put it on both sides of the #if _POSIX_THREADS?

@compnerd
Copy link
Member Author

@swift-ci please test

Adjust the signature for the internal callback to be const-correct which
avoids an error (warning) with the newer compiler.  Additionally cast
the function pointer in the RunLoop to match the expected signature.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@shahmishal Any idea what this error is about?

 dyld: Library not loaded: @rpath/libSwiftOperators.dylib
      Referenced from: /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/toolchain-macosx-x86_64/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
      Reason: image not found
    /bin/sh: line 1: 48371 Abort trap: 6           /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch

@etcwilde
Copy link
Member

dyld: Library not loaded: @rpath/libSwiftOperators.dylib
Referenced from: /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/toolchain-macosx-x86_64/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
Reason: image not found
/bin/sh: line 1: 48371 Abort trap: 6 /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch

That suggests there's an out-of-date swift-syntax checkout.

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

3 similar comments
@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@compnerd
Copy link
Member Author

@swift-ci please clean test macOS platform

@etcwilde
Copy link
Member

@swift-ci please test macOS platform

@shahmishal
Copy link
Member

@shahmishal Any idea what this error is about?

 dyld: Library not loaded: @rpath/libSwiftOperators.dylib
      Referenced from: /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/toolchain-macosx-x86_64/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
      Reason: image not found
    /bin/sh: line 1: 48371 Abort trap: 6           /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch

This should be fixed now, updated the job with required flag.

@compnerd
Copy link
Member Author

Merging this to aid in making forward progress on the rebranch.

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright LGTM

@compnerd compnerd merged commit 0cfadd2 into swiftlang:main Jan 19, 2023
@compnerd compnerd deleted the check-mate branch January 19, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants