objective c - How to fix warning 'no explicit ownership' -


i have method takes indirect pointer argument , then, if error, set error object. i'm trying turn on many warning possible. 1 of them - implicit ownership types on out parameters - generates warning in method:

- (id)dowitherror:(nserror **)error {     ... } 

how can fix code remove warning?

you can fix warning declaring method as

- (id)dowitherror:(nserror * __autoreleasing *)error {     // ... } 

the __autoreleasing ownership qualifier implicitly assumed "out-parameters" (see "4.4.2 indirect parameters" in clang/arc documentation), therefore adding explicitly not change code.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -