Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -676,11 +676,11 @@ - (OFXMLElement *)XMLElementBySerializing { void *pool = objc_autoreleasePoolPush(); OFXMLElement *element; OFEnumerator *keyEnumerator, *objectEnumerator; - id key, object; + id key, object; if ([self isKindOfClass: [OFMutableDictionary class]]) element = [OFXMLElement elementWithName: @"OFMutableDictionary" namespace: OF_SERIALIZATION_NS]; else Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -376,11 +376,11 @@ * request before redirection. This also means stripping * the entity of the request. */ if (_status == 303) { OFEnumerator *keyEnumerator, *objectEnumerator; - id key, object; + OFString *key, *object; keyEnumerator = [headers keyEnumerator]; objectEnumerator = [headers objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && @@ -607,19 +607,17 @@ * the entire request (e.g. in case a keep-alive connection timed out). */ @try { OFString *requestString = constructRequestString(_request); - const char *UTF8String = [requestString UTF8String]; - size_t UTF8StringLength = [requestString UTF8StringLength]; /* * Pass requestString as context to retain it so that the * underlying buffer lives long enough. */ - [sock asyncWriteBuffer: UTF8String - length: UTF8StringLength + [sock asyncWriteBuffer: [requestString UTF8String] + length: [requestString UTF8StringLength] target: self selector: @selector(socket:didWriteRequest: length:context:exception:) context: requestString]; } @catch (id e) { Index: src/OFHTTPCookie.m ================================================================== --- src/OFHTTPCookie.m +++ src/OFHTTPCookie.m @@ -26,33 +26,33 @@ #import "OFInvalidFormatException.h" static void handleAttribute(OFHTTPCookie *cookie, OFString *name, OFString *value) { - OFString *lowerName = [name lowercaseString]; + OFString *lowercaseName = [name lowercaseString]; if (value != nil) { - if ([lowerName isEqual: @"expires"]) { + if ([lowercaseName isEqual: @"expires"]) { OFDate *date = [OFDate dateWithDateString: value format: @"%a, %d %b %Y %H:%M:%S %z"]; [cookie setExpires: date]; - } else if ([lowerName isEqual: @"max-age"]) { + } else if ([lowercaseName isEqual: @"max-age"]) { OFDate *date = [OFDate dateWithTimeIntervalSinceNow: [value decimalValue]]; [cookie setExpires: date]; - } else if ([lowerName isEqual: @"domain"]) + } else if ([lowercaseName isEqual: @"domain"]) [cookie setDomain: value]; - else if ([lowerName isEqual: @"path"]) + else if ([lowercaseName isEqual: @"path"]) [cookie setPath: value]; else [[cookie extensions] addObject: [OFString stringWithFormat: @"%@=%@", name, value]]; } else { - if ([lowerName isEqual: @"secure"]) + if ([lowercaseName isEqual: @"secure"]) [cookie setSecure: true]; - else if ([lowerName isEqual: @"httponly"]) + else if ([lowercaseName isEqual: @"httponly"]) [cookie setHTTPOnly: true]; else if ([name length] > 0) [[cookie extensions] addObject: name]; } } Index: src/OFLocale.m ================================================================== --- src/OFLocale.m +++ src/OFLocale.m @@ -182,11 +182,11 @@ #ifndef OF_AMIGAOS char *locale, *messagesLocale = NULL; if (currentLocale != nil) @throw [OFInitializationFailedException - exceptionWithClass: [OFLocale class]]; + exceptionWithClass: [self class]]; _encoding = OF_STRING_ENCODING_UTF_8; _decimalPoint = @"."; _localizedStrings = [[OFMutableArray alloc] init]; Index: src/OFString+JSONValue.m ================================================================== --- src/OFString+JSONValue.m +++ src/OFString+JSONValue.m @@ -457,11 +457,12 @@ if (--depthLimit == 0) return nil; while (**pointer != '}') { - id key, object; + OFString *key; + id object; skipWhitespacesAndComments(pointer, stop, line); if (*pointer >= stop) return nil; @@ -487,11 +488,11 @@ **pointer == '_' || **pointer == '$' || **pointer == '\\') key = parseIdentifier(pointer, stop); else key = nextObject(pointer, stop, line, depthLimit); - if (key == nil) + if (![key isKindOfClass: [OFString class]]) return nil; skipWhitespacesAndComments(pointer, stop, line); if (*pointer + 1 >= stop || **pointer != ':') return nil; Index: src/OFString+PathAdditions_AmigaOS.m ================================================================== --- src/OFString+PathAdditions_AmigaOS.m +++ src/OFString+PathAdditions_AmigaOS.m @@ -103,12 +103,11 @@ * AmigaOS needs the full parsing to determine the last path component. * This could be optimized by not creating the temporary objects, * though. */ void *pool = objc_autoreleasePoolPush(); - OFArray OF_GENERIC(OFString *) *components = [self pathComponents]; - OFString *ret = [components lastObject]; + OFString *ret = [[self pathComponents] lastObject]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -2364,12 +2364,11 @@ done = false; break; } - if ([object isEqual: @".."] && - parent != nil && + if ([object isEqual: @".."] && parent != nil && ![parent isEqual: @".."]) { [array removeObjectsInRange: of_range(i - 1, 2)]; done = false; Index: src/OFXMLElement.m ================================================================== --- src/OFXMLElement.m +++ src/OFXMLElement.m @@ -285,11 +285,11 @@ @try { void *pool = objc_autoreleasePoolPush(); OFXMLElement *attributesElement, *namespacesElement; OFXMLElement *childrenElement; OFEnumerator *keyEnumerator, *objectEnumerator; - id key, object; + OFString *key, *object; if (![[element name] isEqual: [self className]] || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exception]; @@ -326,12 +326,12 @@ ![_namespaces isKindOfClass: [OFMutableDictionary class]]) || (_children != nil && ![_children isKindOfClass: [OFMutableArray class]])) @throw [OFInvalidArgumentException exception]; - for (object in _attributes) - if (![object isKindOfClass: [OFXMLAttribute class]]) + for (OFXMLAttribute *attribute in _attributes) + if (![attribute isKindOfClass: [OFXMLAttribute class]]) @throw [OFInvalidArgumentException exception]; keyEnumerator = [_namespaces keyEnumerator]; objectEnumerator = [_namespaces objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && @@ -447,11 +447,11 @@ /* Add the namespaces of the current element */ if (allNamespaces != nil) { OFEnumerator *keyEnumerator = [_namespaces keyEnumerator]; OFEnumerator *objectEnumerator = [_namespaces objectEnumerator]; OFMutableDictionary *tmp; - id key, object; + OFString *key, *object; tmp = [[allNamespaces mutableCopy] autorelease]; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil)