Skip to content

Commit

Permalink
Merge pull request #153 from rsanchezsaez/warning-fixes
Browse files Browse the repository at this point in the history
Static analyzer warning fixes
  • Loading branch information
pixelglow committed Oct 28, 2016
2 parents fc1e204 + 680dc40 commit bd1ce60
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 0 additions & 2 deletions ZipZap/ZZArchive.mm
Expand Up @@ -100,8 +100,6 @@ - (BOOL)loadCanMiss:(BOOL)canMiss error:(out NSError**)error
{
if (canMiss && readError.code == NSFileReadNoSuchFileError && [readError.domain isEqualToString:NSCocoaErrorDomain])
{
_contents = nil;
_entries = nil;
return YES;
}
else
Expand Down
12 changes: 8 additions & 4 deletions ZipZap/ZZArchiveEntry.m
Expand Up @@ -92,7 +92,8 @@ - (BOOL)encrypted

- (NSDate*)lastModified
{
return nil;
// This is an abstract class. This method cannot be called and should instead be implemented by a subclass.
return (id _Nonnull)nil;
}

- (NSUInteger)crc32
Expand Down Expand Up @@ -122,7 +123,8 @@ - (NSString*)fileName

- (NSData*)rawFileName
{
return nil;
// This is an abstract class. This method cannot be called and should instead be implemented by a subclass.
return (id _Nonnull)nil;
}

- (NSStringEncoding)encoding
Expand All @@ -147,7 +149,8 @@ - (BOOL)check:(NSError**)error

- (NSString*)fileNameWithEncoding:(NSStringEncoding)encoding
{
return nil;
// This is an abstract class. This method cannot be called and should instead be implemented by a subclass.
return (id _Nonnull)nil;
}

- (NSData*)newDataWithError:(NSError**)error
Expand All @@ -172,7 +175,8 @@ - (CGDataProviderRef)newDataProviderWithPassword:(NSString*)password error:(NSEr

- (id<ZZArchiveEntryWriter>)newWriterCanSkipLocalFile:(BOOL)canSkipLocalFile
{
return nil;
// This is an abstract class. This method cannot be called and should instead be implemented by a subclass.
return (id _Nonnull)nil;
}

@end
2 changes: 1 addition & 1 deletion ZipZap/ZZInflateInputStream.h
Expand Up @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN

@interface ZZInflateInputStream : NSInputStream

+ (NSData*)decompressData:(NSData*)data
+ (nullable NSData*)decompressData:(NSData*)data
withUncompressedSize:(NSUInteger)uncompressedSize;

- (instancetype)initWithStream:(NSInputStream*)upstream;
Expand Down

0 comments on commit bd1ce60

Please sign in to comment.