@@ -267,11 +267,11 @@ - initWithStringRepresentation: (OFString*)string { @try { const char *cString; - size_t i, count; + size_t count; count = [string cStringLengthWithEncoding: OF_STRING_ENCODING_ASCII]; if (count % 2 != 0) @@ -282,11 +282,11 @@ self = [self initWithCapacity: count]; cString = [string cStringWithEncoding: OF_STRING_ENCODING_ASCII]; - for (i = 0; i < count; i++) { + for (size_t i = 0; i < count; i++) { uint8_t c1 = cString[2 * i]; uint8_t c2 = cString[2 * i + 1]; uint8_t byte; if (c1 >= '0' && c1 <= '9') @@ -569,15 +569,14 @@ } - (uint32_t)hash { uint32_t hash; - size_t i; OF_HASH_INIT(hash); - for (i = 0; i < _count * _itemSize; i++) + for (size_t i = 0; i < _count * _itemSize; i++) OF_HASH_ADD(hash, ((uint8_t*)_items)[i]); OF_HASH_FINALIZE(hash); return hash; @@ -584,19 +583,16 @@ } - (OFString*)description { OFMutableString *ret = [OFMutableString stringWithString: @"<"]; - size_t i; - for (i = 0; i < _count; i++) { - size_t j; - + for (size_t i = 0; i < _count; i++) { if (i > 0) [ret appendString: @" "]; - for (j = 0; j < _itemSize; j++) + for (size_t j = 0; j < _itemSize; j++) [ret appendFormat: @"%02x", _items[i * _itemSize + j]]; } [ret appendString: @">"]; @@ -605,14 +601,13 @@ } - (OFString*)stringRepresentation { OFMutableString *ret = [OFMutableString string]; - size_t i, j; - for (i = 0; i < _count; i++) - for (j = 0; j < _itemSize; j++) + for (size_t i = 0; i < _count; i++) + for (size_t j = 0; j < _itemSize; j++) [ret appendFormat: @"%02x", _items[i * _itemSize + j]]; [ret makeImmutable]; return ret; }