When perform a migration of my project to Obejctive-C ARC, i got one error:
implicit conversion of 'bool' (aka 'signed char') to 'nsdata *' is disallowed with arc
The function Xcode is referring to for this error is returning NO
or nil
although its returning type is of type NSData
:
- (NSData *)compressBytes:(Bytef *)bytes length:(NSUInteger)length error:(NSError **)err shouldFinish:(BOOL)shouldFinish
{
if (length == 0) return nil;
int status;
if (status == myVariable) {
break;
} else if (status != y_OK) {
if (err) {
*err = [[self class] deflateErrorWithCode:status];
}
return NO;
}
However, i am not quite sure i know how to fix that, any idea will be appreciated.