Changeset 13434


Ignore:
Timestamp:
Aug 13, 2012, 12:52:04 AM (9 years ago)
Author:
livings124
Message:

silence several warnings related to printing ints in strings

Location:
trunk/macosx
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/AddMagnetWindowController.m

    r13251 r13434  
    184184        case POPUP_PRIORITY_NORMAL: priority = TR_PRI_NORMAL; break;
    185185        case POPUP_PRIORITY_LOW: priority = TR_PRI_LOW; break;
    186         default: NSAssert1(NO, @"Unknown priority tag for adding torrent: %d", [sender tag]);
     186        default: NSAssert1(NO, @"Unknown priority tag for adding torrent: %ld", [sender tag]);
    187187    }
    188188    [fTorrent setPriority: priority];
  • trunk/macosx/AddWindowController.m

    r13416 r13434  
    258258        case POPUP_PRIORITY_NORMAL: priority = TR_PRI_NORMAL; break;
    259259        case POPUP_PRIORITY_LOW: priority = TR_PRI_LOW; break;
    260         default: NSAssert1(NO, @"Unknown priority tag for adding torrent: %d", [sender tag]);
     260        default: NSAssert1(NO, @"Unknown priority tag for adding torrent: %ld", [sender tag]);
    261261    }
    262262    [fTorrent setPriority: priority];
  • trunk/macosx/Controller.m

    r13424 r13434  
    21162116            break;
    21172117        default:
    2118             NSAssert1(NO, @"Unknown sort tag received: %d", [(NSMenuItem *)sender tag]);
     2118            NSAssert1(NO, @"Unknown sort tag received: %ld", [(NSMenuItem *)sender tag]);
    21192119            return;
    21202120    }
     
    41194119                break;
    41204120            default:
    4121                 NSAssert1(NO, @"Unknown sort tag received: %d", [menuItem tag]);
     4121                NSAssert1(NO, @"Unknown sort tag received: %ld", [menuItem tag]);
    41224122        }
    41234123       
  • trunk/macosx/FileListNode.m

    r13251 r13434  
    100100{
    101101    if (!fIsFolder)
    102         return [NSString stringWithFormat: @"%@ (%d)", fName, [fIndexes firstIndex]];
     102        return [NSString stringWithFormat: @"%@ (%ld)", fName, [fIndexes firstIndex]];
    103103    else
    104104        return [NSString stringWithFormat: @"%@ (folder: %@)", fName, fIndexes];
  • trunk/macosx/InfoGeneralViewController.m

    r13251 r13434  
    9999        Torrent * torrent = [fTorrents objectAtIndex: 0];
    100100       
    101         NSString * piecesString = ![torrent isMagnet] ? [NSString stringWithFormat: @"%d, %@", [torrent pieceCount],
     101        NSString * piecesString = ![torrent isMagnet] ? [NSString stringWithFormat: @"%ld, %@", [torrent pieceCount],
    102102                                        [NSString stringForFileSize: [torrent pieceSize]]] : @"";
    103103        [fPiecesField setStringValue: piecesString];
  • trunk/macosx/InfoOptionsViewController.m

    r13377 r13434  
    340340            break;
    341341        default:
    342             NSAssert1(NO, @"Unknown option selected in ratio popup: %d", [sender indexOfSelectedItem]);
     342            NSAssert1(NO, @"Unknown option selected in ratio popup: %ld", [sender indexOfSelectedItem]);
    343343            return;
    344344    }
     
    386386            break;
    387387        default:
    388             NSAssert1(NO, @"Unknown option selected in idle popup: %d", [sender indexOfSelectedItem]);
     388            NSAssert1(NO, @"Unknown option selected in idle popup: %ld", [sender indexOfSelectedItem]);
    389389            return;
    390390    }
     
    443443            break;
    444444        default:
    445             NSAssert1(NO, @"Unknown option selected in priority popup: %d", [sender indexOfSelectedItem]);
     445            NSAssert1(NO, @"Unknown option selected in priority popup: %ld", [sender indexOfSelectedItem]);
    446446            return;
    447447    }
  • trunk/macosx/InfoPeersViewController.m

    r13340 r13434  
    374374        NSInteger port;
    375375        if ((port = [[peer objectForKey: @"Port"] intValue]) > 0)
    376             portString = [NSString stringWithFormat: @"%d", port];
     376            portString = [NSString stringWithFormat: @"%ld", port];
    377377        else
    378378            portString = NSLocalizedString(@"N/A", "Inspector -> Peers tab -> table row tooltip");
     
    406406                break;
    407407            default:
    408                 NSAssert1(NO, @"Peer from unknown source: %d", peerFrom);
     408                NSAssert1(NO, @"Peer from unknown source: %ld", peerFrom);
    409409        }
    410410       
  • trunk/macosx/InfoTrackersViewController.m

    r13251 r13434  
    126126    else
    127127    {
    128         NSAssert1([fTorrents count] == 1, @"Attempting to add tracker with %d transfers selected", [fTorrents count]);
     128        NSAssert1([fTorrents count] == 1, @"Attempting to add tracker with %ld transfers selected", [fTorrents count]);
    129129       
    130130        NSIndexSet * addedIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange([fTrackers count]-2, 2)];
     
    297297    [[[self view] window] makeKeyWindow];
    298298   
    299     NSAssert1([fTorrents count] == 1, @"Attempting to add tracker with %d transfers selected", [fTorrents count]);
     299    NSAssert1([fTorrents count] == 1, @"Attempting to add tracker with %ld transfers selected", [fTorrents count]);
    300300   
    301301    [fTrackers addObject: [NSDictionary dictionaryWithObject: [NSNumber numberWithInteger: -1] forKey: @"Tier"]];
  • trunk/macosx/InfoWindowController.m

    r13412 r13434  
    278278            break;
    279279        default:
    280             NSAssert1(NO, @"Unknown info tab selected: %d", fCurrentTabTag);
     280            NSAssert1(NO, @"Unknown info tab selected: %ld", fCurrentTabTag);
    281281            return;
    282282    }
  • trunk/macosx/MessageWindowController.m

    r13399 r13434  
    275275                return [NSImage imageNamed: @"PurpleDot"];
    276276            default:
    277                 NSAssert1(NO, @"Unknown message log level: %d", level);
     277                NSAssert1(NO, @"Unknown message log level: %ld", level);
    278278                return nil;
    279279        }
     
    348348            break;
    349349        default:
    350             NSAssert1(NO, @"Unknown message log level: %d", [fLevelButton indexOfSelectedItem]);
     350            NSAssert1(NO, @"Unknown message log level: %ld", [fLevelButton indexOfSelectedItem]);
    351351    }
    352352   
     
    542542            break;
    543543        default:
    544             NSAssert1(NO, @"Unknown message log level: %d", level);
     544            NSAssert1(NO, @"Unknown message log level: %ld", level);
    545545    }
    546546   
  • trunk/macosx/PortChecker.m

    r13251 r13434  
    2525#import "PortChecker.h"
    2626
    27 #define CHECKER_URL(port) [NSString stringWithFormat: @"http://portcheck.transmissionbt.com/%d", port]
     27#define CHECKER_URL(port) [NSString stringWithFormat: @"http://portcheck.transmissionbt.com/%ld", port]
    2828#define CHECK_FIRE 3.0
    2929
  • trunk/macosx/PrefsController.m

    r13413 r13434  
    5656#define RPC_KEYCHAIN_NAME       "Remote"
    5757
    58 #define WEBUI_URL   @"http://localhost:%d/"
     58#define WEBUI_URL   @"http://localhost:%ld/"
    5959
    6060@interface PrefsController (Private)
  • trunk/macosx/QuickLookPlugin/GeneratePreviewForURL.m

    r13433 r13434  
    155155   
    156156    if ([lists count] > 0)
    157         [htmlString appendFormat: @"<hr/><br>%@", [lists componentsJoinedByString: @"<br><br>"]];
     157        [htmlString appendFormat: @"<hr/><br>%@", [lists componentsJoinedByString: @"<br>"]];
    158158   
    159159    [htmlString appendString: @"</body></html>"];
  • trunk/macosx/StatusBarController.m

    r13343 r13434  
    166166            break;
    167167        default:
    168             NSAssert1(NO, @"Unknown status label tag received: %d", [sender tag]);
     168            NSAssert1(NO, @"Unknown status label tag received: %ld", [sender tag]);
    169169            return;
    170170    }
     
    236236                break;
    237237            default:
    238                 NSAssert1(NO, @"Unknown status label tag received: %d", [menuItem tag]);
     238                NSAssert1(NO, @"Unknown status label tag received: %ld", [menuItem tag]);
    239239        }
    240240       
  • trunk/macosx/Torrent.m

    r13426 r13434  
    13741374- (BOOL) canChangeDownloadCheckForFile: (NSUInteger) index
    13751375{
    1376     NSAssert2(index < [self fileCount], @"Index %d is greater than file count %d", index, [self fileCount]);
     1376    NSAssert2(index < [self fileCount], @"Index %ld is greater than file count %ld", index, [self fileCount]);
    13771377   
    13781378    return [self canChangeDownloadCheckForFiles: [NSIndexSet indexSetWithIndex: index]];
     
    14761476                break;
    14771477            default:
    1478                 NSAssert2(NO, @"Unknown priority %d for file index %d", priority, index);
     1478                NSAssert2(NO, @"Unknown priority %d for file index %ld", priority, index);
    14791479        }
    14801480       
  • trunk/macosx/TorrentGroup.m

    r13251 r13434  
    5050- (NSString *) description
    5151{
    52     return [NSString stringWithFormat: @"Torrent Group %d: %@", fGroup, fTorrents];
     52    return [NSString stringWithFormat: @"Torrent Group %ld: %@", fGroup, fTorrents];
    5353}
    5454
  • trunk/macosx/TorrentTableView.m

    r13255 r13434  
    827827            break;
    828828        default:
    829             NSAssert1(NO, @"Unknown priority: %d", [sender tag]);
     829            NSAssert1(NO, @"Unknown priority: %ld", [sender tag]);
    830830    }
    831831   
  • trunk/macosx/TrackerCell.m

    r13340 r13434  
    313313- (NSAttributedString *) attributedCount: (NSInteger) count
    314314{
    315     NSString * countString = count != -1 ? [NSString stringWithFormat: @"%d", count] : NSLocalizedString(@"N/A", "tracker peer stat");
     315    NSString * countString = count != -1 ? [NSString stringWithFormat: @"%ld", count] : NSLocalizedString(@"N/A", "tracker peer stat");
    316316    return [[[NSAttributedString alloc] initWithString: countString attributes: fStatusAttributes] autorelease];
    317317}
Note: See TracChangeset for help on using the changeset viewer.