Skip to content

Foundation: clear up some unused return value warnings #366

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
May 23, 2016

Conversation

compnerd
Copy link
Member

This just cleans up a set of unused-return-value warnings in the Foundation
implementation. NFC.

This just cleans up a set of unused-return-value warnings in the Foundation
implementation.  NFC.
@compnerd compnerd force-pushed the unused-return-value branch from 2de8d4f to 0d6d0de Compare May 15, 2016 05:26
@modocache
Copy link
Contributor

@swift-ci please test

1 similar comment
@parkera
Copy link
Contributor

parkera commented May 17, 2016

@swift-ci please test

@phausler
Copy link
Contributor

Some of these are actually hiding potential errors or error handling. I am actually very surprised that the glibc functions are being imported with a warning (since they are not annotated with __attribute__((warn_unsed_result)). I was under the assumption that swift functions were now by default with this warning, but un-annotated methods imported from external languages (objc/c) were suppressed.

@compnerd
Copy link
Member Author

I agree that error checking would be good (e.g. on stat). However, this is maintaining the status quo. I think that we should figure out which of these are interesting cases to error check and then do that in a follow up change.

@phausler phausler merged commit 182d5c9 into swiftlang:master May 23, 2016
russbishop pushed a commit to russbishop/swift-corelibs-foundation that referenced this pull request May 31, 2016
This just cleans up a set of unused-return-value warnings in the Foundation
implementation.  NFC.
phausler pushed a commit that referenced this pull request Jun 13, 2016
This just cleans up a set of unused-return-value warnings in the Foundation
implementation.  NFC.
kateinoigakukun pushed a commit to kateinoigakukun/swift-corelibs-foundation that referenced this pull request Oct 11, 2023
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.

4 participants