Update NSXMLElement.m to satisfy older compilers

This commit is contained in:
Doug Simons 2024-05-14 15:56:43 -06:00 committed by GitHub
parent f5f8f61e54
commit fdffcbdd27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -364,7 +364,8 @@ extern void ensure_oldNs(xmlNodePtr node);
// 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 @@ extern void ensure_oldNs(xmlNodePtr node);
// 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];