diff --git a/Source/NSXMLElement.m b/Source/NSXMLElement.m index c9a81e25a..e6eea3dd6 100644 --- a/Source/NSXMLElement.m +++ b/Source/NSXMLElement.m @@ -364,7 +364,8 @@ - (void) setAttributes: (NSArray*)attributes // Remove all previous attributes NSArray *currentAttributes = [self attributes]; - for (int index = [currentAttributes count]-1; index >= 0; index--) + int index; + for (index = [currentAttributes count]-1; index >= 0; index--) { NSXMLNode *attrNode = [currentAttributes objectAtIndex:index]; NSString *name = [attrNode name]; @@ -389,7 +390,8 @@ - (void) setAttributesWithDictionary: (NSDictionary*)attributes // Remove all previous attributes NSArray *currentAttributes = [self attributes]; - for (int index = [currentAttributes count]-1; index >= 0; index--) + int index; + for (index = [currentAttributes count]-1; index >= 0; index--) { NSXMLNode *attrNode = [currentAttributes objectAtIndex:index]; NSString *name = [attrNode name];