Index: src/OFHTTPResponse.m ================================================================== --- src/OFHTTPResponse.m +++ src/OFHTTPResponse.m @@ -212,14 +212,16 @@ if ([name isEqual: @"charset"]) charset = value; } - @try { - ret = OFStringEncodingParseName(charset); - } @catch (OFInvalidArgumentException *e) { - ret = OFStringEncodingAutodetect; + ret = OFStringEncodingAutodetect; + if (charset != nil) { + @try { + ret = OFStringEncodingParseName(charset); + } @catch (OFInvalidArgumentException *e) { + } } return ret; } Index: src/OFXMLParser.h ================================================================== --- src/OFXMLParser.h +++ src/OFXMLParser.h @@ -41,11 +41,11 @@ * @param target The target of the processing instruction * @param text The text of the processing instruction */ - (void)parser: (OFXMLParser *)parser foundProcessingInstructionWithTarget: (OFString *)target - text: (OFString *)text; + text: (nullable OFString *)text; /** * @brief This callback is called when the XML parser found the start of a new * tag. * Index: src/exceptions/OFBindUNIXSocketFailedException.h ================================================================== --- src/exceptions/OFBindUNIXSocketFailedException.h +++ src/exceptions/OFBindUNIXSocketFailedException.h @@ -41,11 +41,11 @@ * @param path The path on which binding failed * @param socket The socket which could not be bound * @param errNo The errno of the error that occurred * @return A new, autoreleased bind UNIX socket failed exception */ -+ (instancetype)exceptionWithPath: (OFString *)path ++ (instancetype)exceptionWithPath: (nullable OFString *)path socket: (id)socket errNo: (int)errNo; + (instancetype)exceptionWithSocket: (id)socket errNo: (int)errNo OF_UNAVAILABLE; @@ -56,13 +56,13 @@ * @param path The path on which binding failed * @param socket The socket which could not be bound * @param errNo The errno of the error that occurred * @return An initialized bind UNIX socket failed exception */ -- (instancetype)initWithPath: (OFString *)path +- (instancetype)initWithPath: (nullable OFString *)path socket: (id)socket errNo: (int)errNo OF_DESIGNATED_INITIALIZER; - (instancetype)initWithSocket: (id)socket errNo: (int)errNo OF_UNAVAILABLE; @end OF_ASSUME_NONNULL_END Index: src/runtime/private.h ================================================================== --- src/runtime/private.h +++ src/runtime/private.h @@ -37,11 +37,11 @@ unsigned long version; unsigned long info; long instanceSize; struct objc_ivar_list *_Nullable ivars; struct objc_method_list *_Nullable methodList; - struct objc_dtable *_Nonnull dTable; + struct objc_dtable *_Nullable dTable; Class _Nullable *_Nullable subclassList; void *_Nullable siblingClass; struct objc_protocol_list *_Nullable protocols; void *_Nullable GCObjectType; unsigned long ABIVersion; Index: utils/ofarc/Archive.h ================================================================== --- utils/ofarc/Archive.h +++ utils/ofarc/Archive.h @@ -18,15 +18,15 @@ #import "OFArray.h" OF_ASSUME_NONNULL_BEGIN @protocol Archive -+ (instancetype)archiveWithPath: (OFString *)path ++ (instancetype)archiveWithPath: (nullable OFString *)path stream: (OF_KINDOF(OFStream *))stream mode: (OFString *)mode encoding: (OFStringEncoding)encoding; -- (instancetype)initWithPath: (OFString *)path +- (instancetype)initWithPath: (nullable OFString *)path stream: (OF_KINDOF(OFStream *))stream mode: (OFString *)mode encoding: (OFStringEncoding)encoding; - (void)listFiles; - (void)extractFiles: (OFArray OF_GENERIC(OFString *) *)files; Index: utils/ofarc/OFArc.m ================================================================== --- utils/ofarc/OFArc.m +++ utils/ofarc/OFArc.m @@ -486,15 +486,17 @@ } [OFApplication terminateWithStatus: _exitStatus]; } -- (id )openArchiveWithPath: (OFString *)path +- (id )openArchiveWithPath: (OFString *)path_ type: (OFString *)type mode: (char)mode encoding: (OFStringEncoding)encoding { + /* To make clang-analyzer happy about assigning nil to path later. */ + OFString *path = path_; OFString *modeString, *fileModeString; OFStream *file = nil; id archive = nil; [_archivePath release]; @@ -645,15 +647,15 @@ } return archive; error: - if (mode == 'c') + if (mode == 'c' && path != nil) [[OFFileManager defaultManager] removeItemAtPath: path]; [OFApplication terminateWithStatus: 1]; - return nil; + abort(); } - (bool)shouldExtractFile: (OFString *)fileName outFileName: (OFString *)outFileName {