From 99084a119085e4c8d84836c1ddb6cc95dfa7729e Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 24 Apr 2010 16:50:18 +0000 Subject: [PATCH] eliminate a warning --- macosx/Controller.m | 14 +++++++------- macosx/Torrent.m | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 8ecb20943..b1b6ce40b 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -981,18 +981,18 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy return; } - Torrent * torrent; - if (!(torrent = [[Torrent alloc] initWithMagnetAddress: address location: nil lib: fLib])) - { - [self invalidOpenMagnetAlert: address]; - return; - } - //determine download location NSString * location = nil; if ([fDefaults boolForKey: @"DownloadLocationConstant"]) location = [[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath]; + Torrent * torrent; + if (!(torrent = [[Torrent alloc] initWithMagnetAddress: address location: location lib: fLib])) + { + [self invalidOpenMagnetAlert: address]; + return; + } + //change the location if the group calls for it (this has to wait until after the torrent is created) if ([[GroupsController groups] usesCustomDownloadLocationForIndex: [torrent groupValue]]) { diff --git a/macosx/Torrent.m b/macosx/Torrent.m index f07cb8c06..fba45f805 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -102,7 +102,6 @@ int trashDataFile(const char * filename) return self; } -#warning need location (and use it)? - (id) initWithMagnetAddress: (NSString *) address location: (NSString *) location lib: (tr_session *) lib { self = [self initWithPath: nil hash: nil torrentStruct: nil magnetAddress: address