From 65f2ba6b1ded9657f81d00ee8044b31233774426 Mon Sep 17 00:00:00 2001 From: "Stephen F. Booth" Date: Fri, 18 Sep 2020 09:06:18 -0500 Subject: [PATCH] Fix format string warnings --- Drive/Drive.m | 2 +- Rippers/ComparisonRipper.m | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Drive/Drive.m b/Drive/Drive.m index 4db2e7f0..9257ab15 100644 --- a/Drive/Drive.m +++ b/Drive/Drive.m @@ -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; } diff --git a/Rippers/ComparisonRipper.m b/Rippers/ComparisonRipper.m index 06a34d44..851dafc4 100644 --- a/Rippers/ComparisonRipper.m +++ b/Rippers/ComparisonRipper.m @@ -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", @"")); @@ -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 @@ -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];