Skip to content

Commit

Permalink
Fix format string warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sbooth committed Sep 18, 2020
1 parent b18c2fe commit 65f2ba6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Drive/Drive.m
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ - (NSString *) readISRC:(NSUInteger)track
cd_read_isrc.track = track;

if(-1 == ioctl([self fileDescriptor], DKIOCCDREADISRC, &cd_read_isrc)) {
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Unable to read the international standard recording code (ISRC) for track %i", @"Exceptions", @""), track]];
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Unable to read the international standard recording code (ISRC) for track %lu", @"Exceptions", @""), (unsigned long)track]];
return nil;
}

Expand Down
10 changes: 5 additions & 5 deletions Rippers/ComparisonRipper.m
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ - (void) ripSectorRange:(SectorRange *)range toFile:(ExtAudioFileRef)file
readRange = [SectorRange sectorRangeWithFirstSector:startSector sectorCount:sectorCount];

// Extract the audio from the disc
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Ripping sectors %i - %i", @"Log", @""), [readRange firstSector], [readRange lastSector]]];
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Ripping sectors %lu - %lu", @"Log", @""), (unsigned long)[readRange firstSector], (unsigned long)[readRange lastSector]]];
sectorsRead = [_drive readAudioAndErrorFlags:buffer sectorRange:readRange];

NSAssert(sectorCount == sectorsRead, NSLocalizedStringFromTable(@"Unable to read from the disc.", @"Log", @""));
Expand Down Expand Up @@ -556,10 +556,10 @@ - (void) ripSectorRange:(SectorRange *)range toFile:(ExtAudioFileRef)file

// Log this message here, instead of in the comparison loop, to avoid repetitive messages
if(blockEnd == i) {
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Mismatch for sector %i", @"Log", @""), [range sectorForIndex:i]]];
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Mismatch for sector %lu", @"Log", @""), (unsigned long)[range sectorForIndex:i]]];
}
else {
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Mismatches for sectors %i - %i", @"Log", @""), [range sectorForIndex:i], [range sectorForIndex:blockEnd]]];
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Mismatches for sectors %lu - %lu", @"Log", @""), (unsigned long)[range sectorForIndex:i], (unsigned long)[range sectorForIndex:blockEnd]]];
}

// Adjust boundaries so drive is up to speed when it reaches the problem area if
Expand Down Expand Up @@ -601,10 +601,10 @@ - (void) ripSectorRange:(SectorRange *)range toFile:(ExtAudioFileRef)file

// Extract the audio from the disc
if(1 == [readRange length]) {
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Re-ripping sector %i", @"Log", @""), [readRange firstSector]]];
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Re-ripping sector %lu", @"Log", @""), (unsigned long)[readRange firstSector]]];
}
else {
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Re-ripping sectors %i - %i", @"Log", @""), [readRange firstSector], [readRange lastSector]]];
[self logMessage:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Re-ripping sectors %lu - %lu", @"Log", @""), (unsigned long)[readRange firstSector], (unsigned long)[readRange lastSector]]];
}
sectorsRead = [_drive readAudioAndErrorFlags:buffer sectorRange:readRange];

Expand Down

0 comments on commit 65f2ba6

Please sign in to comment.