Silence some new warnings with LLVM 3.0/Xcode 4.2

This commit is contained in:
Mitchell Livingston 2011-10-18 02:30:22 +00:00
parent 4d74095591
commit 995d754baf
7 changed files with 14 additions and 13 deletions

View File

@ -1999,7 +1999,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
BuildIndependentTargetsInParallel = YES; BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 0410; LastUpgradeCheck = 0420;
ORGANIZATIONNAME = "The Transmission Project"; ORGANIZATIONNAME = "The Transmission Project";
}; };
buildConfigurationList = 4DF0C59A089918A300DD8943 /* Build configuration list for PBXProject "Transmission" */; buildConfigurationList = 4DF0C59A089918A300DD8943 /* Build configuration list for PBXProject "Transmission" */;

View File

@ -1255,7 +1255,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
const NSInteger selected = [torrents count]; const NSInteger selected = [torrents count];
if (selected == 1) if (selected == 1)
{ {
NSString * torrentName = [[torrents objectAtIndex: 0] name]; NSString * torrentName = [(Torrent *)[torrents objectAtIndex: 0] name];
if (deleteData) if (deleteData)
title = [NSString stringWithFormat: title = [NSString stringWithFormat:
@ -1379,7 +1379,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSString * message, * info; NSString * message, * info;
if ([torrents count] == 1) if ([torrents count] == 1)
{ {
NSString * torrentName = [[torrents objectAtIndex: 0] name]; NSString * torrentName = [(Torrent *)[torrents objectAtIndex: 0] name];
message = [NSString stringWithFormat: NSLocalizedString(@"Are you sure you want to remove \"%@\" from the transfer list?", message = [NSString stringWithFormat: NSLocalizedString(@"Are you sure you want to remove \"%@\" from the transfer list?",
"Remove completed confirm panel -> title"), torrentName]; "Remove completed confirm panel -> title"), torrentName];
@ -1435,7 +1435,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSInteger count = [torrents count]; NSInteger count = [torrents count];
if (count == 1) if (count == 1)
[panel setMessage: [NSString stringWithFormat: NSLocalizedString(@"Select the new folder for \"%@\".", [panel setMessage: [NSString stringWithFormat: NSLocalizedString(@"Select the new folder for \"%@\".",
"Move torrent -> select destination folder"), [[torrents objectAtIndex: 0] name]]]; "Move torrent -> select destination folder"), [(Torrent *)[torrents objectAtIndex: 0] name]]];
else else
[panel setMessage: [NSString stringWithFormat: NSLocalizedString(@"Select the new folder for %d data files.", [panel setMessage: [NSString stringWithFormat: NSLocalizedString(@"Select the new folder for %d data files.",
"Move torrent -> select destination folder"), count]]; "Move torrent -> select destination folder"), count]];
@ -1782,7 +1782,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) setSort: (id) sender - (void) setSort: (id) sender
{ {
NSString * sortType; NSString * sortType;
switch ([sender tag]) switch ([(NSMenuItem *)sender tag])
{ {
case SORT_ORDER_TAG: case SORT_ORDER_TAG:
sortType = SORT_ORDER; sortType = SORT_ORDER;
@ -1810,7 +1810,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
sortType = SORT_SIZE; sortType = SORT_SIZE;
break; break;
default: default:
NSAssert1(NO, @"Unknown sort tag received: %d", [sender tag]); NSAssert1(NO, @"Unknown sort tag received: %d", [(NSMenuItem *)sender tag]);
return; return;
} }
@ -1832,7 +1832,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) setSortReverse: (id) sender - (void) setSortReverse: (id) sender
{ {
const BOOL setReverse = [sender tag] == SORT_DESC_TAG; const BOOL setReverse = [(NSMenuItem *)sender tag] == SORT_DESC_TAG;
if (setReverse != [fDefaults boolForKey: @"SortReverse"]) if (setReverse != [fDefaults boolForKey: @"SortReverse"])
{ {
[fDefaults setBool: setReverse forKey: @"SortReverse"]; [fDefaults setBool: setReverse forKey: @"SortReverse"];
@ -2235,7 +2235,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
{ {
[fTableView removeCollapsedGroup: [torrent groupValue]]; //remove old collapsed group [fTableView removeCollapsedGroup: [torrent groupValue]]; //remove old collapsed group
[torrent setGroupValue: [sender tag]]; [torrent setGroupValue: [(NSMenuItem *)sender tag]];
} }
[self applyFilter]; [self applyFilter];

View File

@ -333,7 +333,7 @@ typedef enum
{ {
NSString * path = [fTorrent fileLocation: item]; NSString * path = [fTorrent fileLocation: item];
if (!path) if (!path)
path = [[item path] stringByAppendingPathComponent: [item name]]; path = [[(FileListNode *)item path] stringByAppendingPathComponent: [(FileListNode *)item name]];
return path; return path;
} }
else if ([ident isEqualToString: @"Check"]) else if ([ident isEqualToString: @"Check"])

View File

@ -184,8 +184,9 @@
return [tableView rowHeight]; return [tableView rowHeight];
} }
- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex - (BOOL) tableView: (NSTableView *) tableView shouldEditTableColumn: (NSTableColumn *) tableColumn row: (NSInteger) row
{ {
//don't allow tier row to be edited by double-click
return NO; return NO;
} }

View File

@ -784,7 +784,7 @@
- (NSAttributedString *) attributedTitle - (NSAttributedString *) attributedTitle
{ {
NSString * title = [[self representedObject] name]; NSString * title = [(Torrent *)[self representedObject] name];
return [[[NSAttributedString alloc] initWithString: title attributes: fTitleAttributes] autorelease]; return [[[NSAttributedString alloc] initWithString: title attributes: fTitleAttributes] autorelease];
} }

View File

@ -202,7 +202,7 @@
- (NSString *) outlineView: (NSOutlineView *) outlineView typeSelectStringForTableColumn: (NSTableColumn *) tableColumn item: (id) item - (NSString *) outlineView: (NSOutlineView *) outlineView typeSelectStringForTableColumn: (NSTableColumn *) tableColumn item: (id) item
{ {
return [item isKindOfClass: [Torrent class]] ? [item name] return [item isKindOfClass: [Torrent class]] ? [(Torrent *)item name]
: [[self preparedCellAtColumn: [self columnWithIdentifier: @"Group"] row: [self rowForItem: item]] stringValue]; : [[self preparedCellAtColumn: [self columnWithIdentifier: @"Group"] row: [self rowForItem: item]] stringValue];
} }

View File

@ -64,7 +64,7 @@ NSMutableSet * fTrackerIconLoading;
+ (void) initialize + (void) initialize
{ {
fTrackerIconCache = [[NSMutableDictionary alloc] init]; fTrackerIconCache = [[NSCache alloc] init];
fTrackerIconLoading = [[NSMutableSet alloc] init]; fTrackerIconLoading = [[NSMutableSet alloc] init];
} }