Index: PLATFORMS.md ================================================================== --- PLATFORMS.md +++ PLATFORMS.md @@ -87,13 +87,13 @@ macOS ----- - * OS Versions: 10.5, 10.7-10.14, Darling + * OS Versions: 10.5, 10.7-10.15, Darling * Architectures: PowerPC, PowerPC64, x86, x86_64 - * Compilers: Clang 3.1-10.0, GCC 4.2.1 + * Compilers: Clang 3.1-10.0, Apple GCC 4.0.1 & 4.2.1 * Runtimes: Apple, ObjFW MorphOS ------- Index: src/OFHostAddressResolver.m ================================================================== --- src/OFHostAddressResolver.m +++ src/OFHostAddressResolver.m @@ -207,11 +207,11 @@ return; } for (OF_KINDOF(OFDNSResourceRecord *) record in [response.answerRecords objectForKey: query.domainName]) { - const of_socket_address_t *address; + const of_socket_address_t *address = NULL; OFDNSQuery *CNAMEQuery; if ([record DNSClass] != OF_DNS_CLASS_IN) continue; Index: src/OFInflateStream.m ================================================================== --- src/OFInflateStream.m +++ src/OFInflateStream.m @@ -228,11 +228,11 @@ - (size_t)lowlevelReadIntoBuffer: (void *)buffer_ length: (size_t)length { unsigned char *buffer = buffer_; - uint16_t bits, tmp, value; + uint16_t bits = 0, tmp, value = 0; size_t bytesWritten = 0; unsigned char *slidingWindow; uint16_t slidingWindowIndex; if (_stream == nil) Index: src/OFLHAArchive.h ================================================================== --- src/OFLHAArchive.h +++ src/OFLHAArchive.h @@ -50,15 +50,14 @@ /*! * @brief A stream for reading the current entry. * * @note This is only available in read mode. * - * @note The returned stream only conforms to @ref OFReadyForReadingObserving if - * the underlying stream does so, too. + * @note The returned stream conforms to @ref OFReadyForReadingObserving if the + * underlying stream does so, too. */ -@property (readonly, nonatomic) - OFStream *streamForReadingCurrentEntry; +@property (readonly, nonatomic) OFStream *streamForReadingCurrentEntry; /*! * @brief Creates a new OFLHAArchive object with the specified stream. * * @param stream A stream from which the LHA archive will be read. @@ -139,12 +138,12 @@ * @note This is only available in write and append mode. * * @note The uncompressed size, compressed size and CRC16 of the specified * entry are ignored. * - * @note The returned stream only conforms to @ref OFReadyForWritingObserving if - * the underlying stream does so, too. + * @note The returned stream conforms to @ref OFReadyForWritingObserving if the + * underlying stream does so, too. * * @warning Calling @ref nextEntry will invalidate all streams returned by * @ref streamForReadingCurrentEntry or * @ref streamForWritingEntry:! Reading from or writing to an * invalidated stream will throw an @ref OFReadFailedException or @@ -151,15 +150,14 @@ * @ref OFWriteFailedException! * * @param entry The entry for which a stream for writing should be returned * @return A stream for writing the specified entry */ -- (OFStream *) - streamForWritingEntry: (OFLHAArchiveEntry *)entry; +- (OFStream *)streamForWritingEntry: (OFLHAArchiveEntry *)entry; /*! * @brief Closes the OFLHAArchive. */ - (void)close; @end OF_ASSUME_NONNULL_END Index: src/OFLHAArchive.m ================================================================== --- src/OFLHAArchive.m +++ src/OFLHAArchive.m @@ -203,11 +203,11 @@ entry: entry]; return entry; } -- (OFStream *)streamForReadingCurrentEntry +- (OFStream *)streamForReadingCurrentEntry { if (_mode != OF_LHA_ARCHIVE_MODE_READ) @throw [OFInvalidArgumentException exception]; if (_lastReturnedStream == nil) @@ -215,12 +215,11 @@ return [[(OFLHAArchiveFileReadStream *)_lastReturnedStream retain] autorelease]; } -- (OFStream *) - streamForWritingEntry: (OFLHAArchiveEntry *)entry +- (OFStream *)streamForWritingEntry: (OFLHAArchiveEntry *)entry { OFString *compressionMethod; if (_mode != OF_LHA_ARCHIVE_MODE_WRITE && _mode != OF_LHA_ARCHIVE_MODE_APPEND) Index: src/OFLHADecompressingStream.m ================================================================== --- src/OFLHADecompressingStream.m +++ src/OFLHADecompressingStream.m @@ -138,11 +138,11 @@ - (size_t)lowlevelReadIntoBuffer: (void *)buffer_ length: (size_t)length { unsigned char *buffer = buffer_; - uint16_t bits, value; + uint16_t bits = 0, value = 0; size_t bytesWritten = 0; if (_stream == nil) @throw [OFNotOpenException exceptionWithObject: self]; Index: src/OFTarArchive.h ================================================================== --- src/OFTarArchive.h +++ src/OFTarArchive.h @@ -50,15 +50,14 @@ /*! * @brief A stream for reading the current entry. * * @note This is only available in read mode. * - * @note The returned stream only conforms to @ref OFReadyForReadingObserving if - * the underlying stream does so, too. + * @note The returned stream conforms to @ref OFReadyForReadingObserving if the + * underlying stream does so, too. */ -@property (readonly, nonatomic) - OFStream *streamForReadingCurrentEntry; +@property (readonly, nonatomic) OFStream *streamForReadingCurrentEntry; /*! * @brief Creates a new OFTarArchive object with the specified stream. * * @param stream A stream from which the tar archive will be read. @@ -136,12 +135,12 @@ /*! * @brief Returns a stream for writing the specified entry. * * @note This is only available in write and append mode. * - * @note The returned stream only conforms to @ref OFReadyForWritingObserving if - * the underlying stream does so, too. + * @note The returned stream conforms to @ref OFReadyForWritingObserving if the + * underlying stream does so, too. * * @warning Calling @ref nextEntry will invalidate all streams returned by * @ref streamForReadingCurrentEntry or * @ref streamForWritingEntry:! Reading from or writing to an * invalidated stream will throw an @ref OFReadFailedException or @@ -148,15 +147,14 @@ * @ref OFWriteFailedException! * * @param entry The entry for which a stream for writing should be returned * @return A stream for writing the specified entry */ -- (OFStream *) - streamForWritingEntry: (OFTarArchiveEntry *)entry; +- (OFStream *)streamForWritingEntry: (OFTarArchiveEntry *)entry; /*! * @brief Closes the OFTarArchive. */ - (void)close; @end OF_ASSUME_NONNULL_END Index: src/OFTarArchive.m ================================================================== --- src/OFTarArchive.m +++ src/OFTarArchive.m @@ -212,11 +212,11 @@ entry: entry]; return entry; } -- (OFStream *)streamForReadingCurrentEntry +- (OFStream *)streamForReadingCurrentEntry { if (_mode != OF_TAR_ARCHIVE_MODE_READ) @throw [OFInvalidArgumentException exception]; if (_lastReturnedStream == nil) @@ -224,12 +224,11 @@ return [[(OFTarArchiveFileReadStream *)_lastReturnedStream retain] autorelease]; } -- (OFStream *) - streamForWritingEntry: (OFTarArchiveEntry *)entry +- (OFStream *)streamForWritingEntry: (OFTarArchiveEntry *)entry { void *pool; if (_mode != OF_TAR_ARCHIVE_MODE_WRITE && _mode != OF_TAR_ARCHIVE_MODE_APPEND) Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -334,11 +334,11 @@ if (name != nil) of_thread_set_name( [name cStringWithEncoding: [OFLocale encoding]]); else - of_thread_set_name(class_getName(self.class)); + of_thread_set_name(class_getName([self class])); } + (OFString *)name { return [OFThread currentThread].name; Index: src/OFZIPArchive.h ================================================================== --- src/OFZIPArchive.h +++ src/OFZIPArchive.h @@ -128,10 +128,13 @@ /*! * @brief Returns a stream for reading the specified file from the archive. * * @note This method is only available in read mode. + * + * @note The returned stream conforms to @ref OFReadyForReadingObserving if the + * underlying stream does so, too. * * @warning Calling @ref streamForReadingFile: will invalidate all streams * previously returned by @ref streamForReadingFile: or * @ref streamForWritingEntry:! Reading from or writing to an * invalidated stream will throw an @ref OFReadFailedException or @@ -144,10 +147,13 @@ /*! * @brief Returns a stream for writing the specified entry to the archive. * * @note This method is only available in write and append mode. + * + * @note The returned stream conforms to @ref OFReadyForWritingObserving if the + * underlying stream does so, too. * * @warning Calling @ref streamForWritingEntry: will invalidate all streams * previously returned by @ref streamForReadingFile: or * @ref streamForWritingEntry:! Reading from or writing to an * invalidated stream will throw an @ref OFReadFailedException or Index: src/bridge/NSArray+OFObject.m ================================================================== --- src/bridge/NSArray+OFObject.m +++ src/bridge/NSArray+OFObject.m @@ -19,10 +19,10 @@ #import "OFNSArray.h" int _NSArray_OFObject_reference; @implementation NSArray (OFObject) -- (id)OFObject +- (OFArray *)OFObject { return [[[OFNSArray alloc] initWithNSArray: self] autorelease]; } @end Index: src/bridge/NSDictionary+OFObject.m ================================================================== --- src/bridge/NSDictionary+OFObject.m +++ src/bridge/NSDictionary+OFObject.m @@ -19,11 +19,11 @@ #import "OFNSDictionary.h" int _NSDictionary_OFObject_reference; @implementation NSDictionary (OFObject) -- (id)OFObject +- (OFDictionary *)OFObject { return [[[OFNSDictionary alloc] initWithNSDictionary: self] autorelease]; } @end Index: src/bridge/NSEnumerator+OFObject.m ================================================================== --- src/bridge/NSEnumerator+OFObject.m +++ src/bridge/NSEnumerator+OFObject.m @@ -19,11 +19,11 @@ #import "OFNSEnumerator.h" int _NSEnumerator_OFObject_reference; @implementation NSEnumerator (OFObject) -- (id)OFObject +- (OFEnumerator *)OFObject { return [[[OFNSEnumerator alloc] initWithNSEnumerator: self] autorelease]; } @end Index: src/bridge/NSNumber+OFObject.m ================================================================== --- src/bridge/NSNumber+OFObject.m +++ src/bridge/NSNumber+OFObject.m @@ -21,11 +21,11 @@ #import "OFInvalidArgumentException.h" int _NSNumber_OFObject_reference; @implementation NSNumber (OFObject) -- (id)OFObject +- (OFNumber *)OFObject { const char *type = self.objCType; if (strcmp(type, "c") == 0) return [OFNumber numberWithChar: self.charValue]; Index: src/bridge/NSSet+OFObject.m ================================================================== --- src/bridge/NSSet+OFObject.m +++ src/bridge/NSSet+OFObject.m @@ -19,10 +19,10 @@ #import "OFNSSet.h" int _NSSet_OFObject_reference; @implementation NSSet (OFObject) -- (id)OFObject +- (OFSet *)OFObject { return [[[OFNSSet alloc] initWithNSSet: self] autorelease]; } @end Index: src/bridge/NSString+OFObject.m ================================================================== --- src/bridge/NSString+OFObject.m +++ src/bridge/NSString+OFObject.m @@ -19,10 +19,10 @@ #import "OFString.h" int _NSString_OFObject_reference; @implementation NSString (OFObject) -- (id)OFObject +- (OFString *)OFObject { return [OFString stringWithUTF8String: self.UTF8String]; } @end Index: src/bridge/OFArray+NSObject.m ================================================================== --- src/bridge/OFArray+NSObject.m +++ src/bridge/OFArray+NSObject.m @@ -20,10 +20,10 @@ #import "OFArray+NSObject.h" int _OFArray_NSObject_reference; @implementation OFArray (NSObject) -- (id)NSObject +- (NSArray *)NSObject { return [[[NSOFArray alloc] initWithOFArray: self] autorelease]; } @end Index: src/bridge/OFDictionary+NSObject.m ================================================================== --- src/bridge/OFDictionary+NSObject.m +++ src/bridge/OFDictionary+NSObject.m @@ -20,11 +20,11 @@ #import "OFDictionary+NSObject.h" int _OFDictionary_NSObject_reference; @implementation OFDictionary (NSObject) -- (id)NSObject +- (NSDictionary *)NSObject { return [[[NSOFDictionary alloc] initWithOFDictionary: self] autorelease]; } @end Index: src/bridge/OFEnumerator+NSObject.m ================================================================== --- src/bridge/OFEnumerator+NSObject.m +++ src/bridge/OFEnumerator+NSObject.m @@ -20,11 +20,11 @@ #import "OFEnumerator+NSObject.h" int _OFEnumerator_NSObject_reference; @implementation OFEnumerator (NSObject) -- (id)NSObject +- (NSEnumerator *)NSObject { return [[[NSOFEnumerator alloc] initWithOFEnumerator: self] autorelease]; } @end Index: src/bridge/OFNumber+NSObject.m ================================================================== --- src/bridge/OFNumber+NSObject.m +++ src/bridge/OFNumber+NSObject.m @@ -22,11 +22,11 @@ #import "OFInvalidArgumentException.h" int _OFNumber_NSObject_reference; @implementation OFNumber (NSObject) -- (id)NSObject +- (NSNumber *)NSObject { const char *type = self.objCType; if (strcmp(type, "B") == 0) return [NSNumber numberWithBool: self.boolValue]; Index: src/bridge/OFSet+NSObject.m ================================================================== --- src/bridge/OFSet+NSObject.m +++ src/bridge/OFSet+NSObject.m @@ -20,10 +20,10 @@ #import "OFSet+NSObject.h" int _OFSet_NSObject_reference; @implementation OFSet (NSObject) -- (id)NSObject +- (NSSet *)NSObject { return [[[NSOFSet alloc] initWithOFSet: self] autorelease]; } @end Index: src/bridge/OFString+NSObject.m ================================================================== --- src/bridge/OFString+NSObject.m +++ src/bridge/OFString+NSObject.m @@ -22,11 +22,11 @@ #import "OFInitializationFailedException.h" int _OFString_NSObject_reference; @implementation OFString (NSObject) -- (id)NSObject +- (NSString *)NSObject { NSString *string = [NSString stringWithUTF8String: self.UTF8String]; if (string == nil) @throw [OFInitializationFailedException Index: src/exceptions/OFLockFailedException.m ================================================================== --- src/exceptions/OFLockFailedException.m +++ src/exceptions/OFLockFailedException.m @@ -57,8 +57,8 @@ - (OFString *)description { return [OFString stringWithFormat: @"A lock of type %@ could not be locked: %s", - _lock.class, strerror(_errNo)]; + [_lock class], strerror(_errNo)]; } @end Index: src/exceptions/OFStillLockedException.m ================================================================== --- src/exceptions/OFStillLockedException.m +++ src/exceptions/OFStillLockedException.m @@ -52,11 +52,11 @@ - (OFString *)description { if (_lock != nil) return [OFString stringWithFormat: @"Deallocation of a lock of type %@ even though it was " - @"still locked!", _lock.class]; + @"still locked!", [_lock class]]; else return @"Deallocation of a lock even though it was still " @"locked!"; } @end Index: src/exceptions/OFUnlockFailedException.m ================================================================== --- src/exceptions/OFUnlockFailedException.m +++ src/exceptions/OFUnlockFailedException.m @@ -57,8 +57,8 @@ - (OFString *)description { return [OFString stringWithFormat: @"A lock of type %@ could not be unlocked: %s", - _lock.class, strerror(_errNo)]; + [_lock class], strerror(_errNo)]; } @end