You can fix that warning by declaring your method as
- (id)doWithError:(NSError * __autoreleasing *)error {
// ...
}
The __autoreleasing
ownership qualifier is implicitly assumed for "out-parameters"
(see "4.4.2 Indirect parameters" in the Clang/ARC documentation),
therefore adding it explicitly does not change the code.