Skip to content

Commit d4830c0

Browse files
committed
Fix int precision warnings and 64-bit format args
1 parent 09329c7 commit d4830c0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

FastImageCache/FICImageTable.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ - (instancetype)initWithFormat:(FICImageFormat *)imageFormat {
167167
NSInteger goalEntriesPerChunk = goalChunkLength / _entryLength;
168168
_entriesPerChunk = MAX(4, goalEntriesPerChunk);
169169
if ([self _maximumCount] > [_imageFormat maximumCount]) {
170-
NSString *message = [NSString stringWithFormat:@"*** FIC Warning: growing desired maximumCount (%d) for format %@ to fill a chunk (%d)", [_imageFormat maximumCount], [_imageFormat name], [self _maximumCount]];
170+
NSString *message = [NSString stringWithFormat:@"*** FIC Warning: growing desired maximumCount (%ld) for format %@ to fill a chunk (%d)", (long)[_imageFormat maximumCount], [_imageFormat name], [self _maximumCount]];
171171
[[FICImageCache sharedImageCache] _logMessage:message];
172172
}
173173
_chunkLength = (size_t)(_entryLength * _entriesPerChunk);
@@ -432,7 +432,7 @@ - (BOOL)entryExistsForEntityUUID:(NSString *)entityUUID sourceImageUUID:(NSStrin
432432
#pragma mark - Working with Entries
433433

434434
- (int)_maximumCount {
435-
return MAX([_imageFormat maximumCount], _entriesPerChunk);
435+
return (int)MAX([_imageFormat maximumCount], _entriesPerChunk);
436436
}
437437

438438
- (void)_setEntryCount:(NSInteger)entryCount {
@@ -495,7 +495,7 @@ - (NSInteger)_nextEntryIndex {
495495
}
496496

497497
if (index >= [self _maximumCount]) {
498-
NSString *message = [NSString stringWithFormat:@"FICImageTable - unable to evict entry from table '%@' to make room. New index %d, desired max %d", [_imageFormat name], index, [self _maximumCount]];
498+
NSString *message = [NSString stringWithFormat:@"FICImageTable - unable to evict entry from table '%@' to make room. New index %ld, desired max %d", [_imageFormat name], (long)index, [self _maximumCount]];
499499
[[FICImageCache sharedImageCache] _logMessage:message];
500500
}
501501

0 commit comments

Comments
 (0)