siesta icon indicating copy to clipboard operation
siesta copied to clipboard

Objective-C BOSResource loadIfNeeded warning (warn_unused_result)

Open nderkach opened this issue 8 years ago • 1 comments

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

nderkach avatar Oct 16 '17 17:10 nderkach

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];

pcantrell avatar Nov 12 '17 18:11 pcantrell