Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -208,14 +208,16 @@ for (size_t i = 1; i < count; i++) { objects[i] = va_arg(arguments, id); OFEnsure(objects[i] != nil); } - return [self initWithObjects: objects count: count]; + self = [self initWithObjects: objects count: count]; } @finally { OFFreeMemory(objects); } + + return self; } - (instancetype)initWithArray: (OFArray *)array { id *objects; @@ -231,14 +233,16 @@ [self release]; @throw e; } @try { - return [self initWithObjects: objects count: count]; + self = [self initWithObjects: objects count: count]; } @finally { OFFreeMemory(objects); } + + return self; } #ifdef __clang__ /* We intentionally don't call into super, so silence the warning. */ # pragma clang diagnostic push Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -216,16 +216,18 @@ [self release]; @throw e; } @try { - return [self initWithObjects: objects + self = [self initWithObjects: objects forKeys: keys count: count]; } @finally { objc_autoreleasePoolPop(pool); } + + return self; } - (instancetype)initWithObject: (id)object forKey: (id)key { @try { @@ -334,17 +336,19 @@ [self release]; @throw e; } @try { - return [self initWithObjects: objects + self = [self initWithObjects: objects forKeys: keys count: count]; } @finally { OFFreeMemory(objects); OFFreeMemory(keys); } + + return self; } - (id)objectForKey: (id)key { OF_UNRECOGNIZED_SELECTOR Index: src/OFSet.m ================================================================== --- src/OFSet.m +++ src/OFSet.m @@ -175,14 +175,16 @@ [self release]; @throw e; } @try { - return [self initWithObjects: objects count: count]; + self = [self initWithObjects: objects count: count]; } @finally { OFFreeMemory(objects); } + + return self; } - (instancetype)initWithArray: (OFArray *)array { void *pool = objc_autoreleasePoolPush(); @@ -256,14 +258,16 @@ for (size_t i = 1; i < count; i++) { objects[i] = va_arg(arguments, id); OFEnsure(objects[i] != nil); } - return [self initWithObjects: objects count: count]; + self = [self initWithObjects: objects count: count]; } @finally { OFFreeMemory(objects); } + + return self; } - (size_t)count { OF_UNRECOGNIZED_SELECTOR Index: src/platform/POSIX/OFSystemInfo+NetworkInterfaces.m ================================================================== --- src/platform/POSIX/OFSystemInfo+NetworkInterfaces.m +++ src/platform/POSIX/OFSystemInfo+NetworkInterfaces.m @@ -68,21 +68,21 @@ @try { for (size_t i = 0; nameindex[i].if_index != 0; i++) { OFString *name = [OFString stringWithCString: nameindex[i].if_name encoding: encoding]; - OFNumber *index = [OFNumber + OFNumber *idx = [OFNumber numberWithUnsignedInt: nameindex[i].if_index]; OFMutableDictionary *interface = [ret objectForKey: name]; if (interface == nil) { interface = [OFMutableDictionary dictionary]; [ret setObject: interface forKey: name]; } - [interface setObject: index + [interface setObject: idx forKey: OFNetworkInterfaceIndex]; } } @finally { if_freenameindex(nameindex); }