1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

silence a warning

This commit is contained in:
Mitchell Livingston 2011-01-09 18:45:18 +00:00
parent e37848ca60
commit 64f6b2cb5f
2 changed files with 6 additions and 1 deletions

View file

@ -211,12 +211,13 @@
}
//match Finder's behavior
NSNumberFormatter * numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
NSNumberFormatter * numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
[numberFormatter setMinimumFractionDigits: 0];
[numberFormatter setMaximumFractionDigits: decimals];
NSString * fileSizeString = [numberFormatter stringFromNumber: [NSNumber numberWithFloat: convertedSize]];
[numberFormatter release];
if (!notAllowedUnit || ![unit isEqualToString: notAllowedUnit])
fileSizeString = [fileSizeString stringByAppendingFormat: @" %@", unit];

View file

@ -1203,6 +1203,10 @@ int trashDataFile(const char * filename)
case TR_STATUS_SEED:
return NSLocalizedString(@"Seeding", "Torrent -> status string");
default:
NSAssert1(NO, @"Unknown activity %d for statis string", fStat->activity);
return nil;
}
}