Skip to content
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

Objective-C BOSResource loadIfNeeded warning (warn_unused_result) #230

Open
nderkach opened this issue Oct 16, 2017 · 1 comment
Open

Objective-C BOSResource loadIfNeeded warning (warn_unused_result) #230

nderkach opened this issue Oct 16, 2017 · 1 comment

Comments

@nderkach
Copy link

In Objective-C loadIfNeeded is expected to return a value and gives a warning:

Ignoring return value of function declared with "warn_unused_result" attribute

@pcantrell
Copy link
Member

Yeah. I haven’t figured out how to suppress that; last I checked, @discardableResult just doesn’t translate to Obj-C. If you know how, I’d welcome a pull request!

In the meantime, you can suppress the warning like this:

_ = [resource loadIfNeeded];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants