Skip to content

Commit c41c3cb

Browse files
committed
int i should match count, which is a CFIndex
1 parent 8255a77 commit c41c3cb

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Sources/CoreFoundation/CFBigNumber.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ uint8_t _CFBigNumAdd(_CFBigNum *r, const _CFBigNum *a, const _CFBigNum *b) {
464464
bigNum = a;
465465
smallNum = b;
466466
}
467-
for (int i = 0; i < sizeof(a->digits) / sizeof(a->digits[0]); i++) {
467+
for (CFIndex i = 0; i < sizeof(a->digits) / sizeof(a->digits[0]); i++) {
468468
int64_t result = (int64_t)bigNum->digits[i] - (int64_t)smallNum->digits[i] - carry;
469469
if (result < 0) {
470470
carry = 1;

Sources/CoreFoundation/CFBundle_Resources.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,11 +1122,11 @@ CF_EXPORT CFTypeRef _Nullable _CFBundleCopyFindResources(CFBundleRef _Nullable b
11221122

11231123
if (
11241124
subPath) {
1125-
int depthLevel = 0;
1125+
CFIndex depthLevel = 0;
11261126
CFArrayRef subPathComponents = CFStringCreateArrayBySeparatingStrings(kCFAllocatorSystemDefault, subPath, CFSTR("/"));
11271127
CFIndex subPathComponentsCount = CFArrayGetCount(subPathComponents);
11281128

1129-
for (int i = 0; i < subPathComponentsCount; i++) {
1129+
for (CFIndex i = 0; i < subPathComponentsCount; i++) {
11301130
CFStringRef comp = CFArrayGetValueAtIndex(subPathComponents, i);
11311131

11321132
if (i == 0 && (CFStringCompare(comp, CFSTR(""), 0) == kCFCompareEqualTo)) {

Sources/CoreFoundation/CFFileUtilities.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ CF_PRIVATE CFArrayRef _CFCreateCFArrayByTokenizingString(const char *values, cha
14141414
}
14151415
free(copyDirPath);
14161416
CFArrayRef pathArray = CFArrayCreate(kCFAllocatorSystemDefault, (const void **)pathList , validPathCount, &kCFTypeArrayCallBacks);
1417-
for(int i = 0; i < validPathCount; i ++) {
1417+
for(size_t i = 0; i < validPathCount; i ++) {
14181418
CFRelease(pathList[i]);
14191419
}
14201420
return pathArray;

Sources/CoreFoundation/CFListFormatter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ CFStringRef _CFListFormatterCreateStringByJoiningStrings(CFAllocatorRef allocato
8787
bool *needsFree = calloc(count, sizeof(bool));
8888

8989
CFStringRef string;
90-
for (int i = 0; i < count; ++i) {
90+
for (CFIndex i = 0; i < count; ++i) {
9191
string = CFArrayGetValueAtIndex(strings, i);
9292
CFIndex const len = CFStringGetLength(string);
9393
UChar const *ucharString = CFStringGetCharactersPtr(string);
@@ -115,7 +115,7 @@ CFStringRef _CFListFormatterCreateStringByJoiningStrings(CFAllocatorRef allocato
115115
if (fmt) {
116116
__cficu_ulistfmt_close(fmt);
117117
}
118-
for (int i = 0; i < count; ++i) {
118+
for (CFIndex i = 0; i < count; ++i) {
119119
UChar *ucharString = ucharStrings[i];
120120
if (ucharString && needsFree[i]) {
121121
free(ucharString);

Sources/_CFXMLInterface/CFXMLInterface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ _CFXMLNodePtr _Nonnull * _Nullable _CFXMLNamespaces(_CFXMLNodePtr node, CFIndex*
13921392

13931393
_CFXMLNodePtr* result = calloc(*count, sizeof(_CFXMLNodePtr));
13941394
ns = ((xmlNode*)node)->nsDef;
1395-
for (int i = 0; i < *count; i++) {
1395+
for (CFIndex i = 0; i < *count; i++) {
13961396
xmlNode* temp = xmlNewNode(ns, (unsigned char *)"");
13971397

13981398
temp->type = _kCFXMLTypeNamespace;

0 commit comments

Comments
 (0)