From 96cbfa635bbf73459c1fd00905a9bbb3d2f5a125 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 23 Dec 2010 19:02:21 +0000 Subject: [PATCH] (trunk daemon) fix compiler warnings on mac --- daemon/remote.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 9df5d5f32..d0b8e4811 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -100,10 +100,10 @@ tr_strltime( char * buf, int seconds, size_t buflen ) minutes = ( seconds % 3600 ) / 60; seconds = ( seconds % 3600 ) % 60; - tr_snprintf( d, sizeof( d ), "%'d day%s", days, days==1?"":"s" ); - tr_snprintf( h, sizeof( h ), "%'d hour%s", hours, hours==1?"":"s" ); - tr_snprintf( m, sizeof( m ), "%'d minute%s", minutes, minutes==1?"":"s" ); - tr_snprintf( s, sizeof( s ), "%'d second%s", seconds, seconds==1?"":"s" ); + tr_snprintf( d, sizeof( d ), "%'d %s", days, days==1?"day":"days" ); + tr_snprintf( h, sizeof( h ), "%'d %s", hours, hours==1?"hour":"hours" ); + tr_snprintf( m, sizeof( m ), "%'d %s", minutes, minutes==1?"minute":"minutes" ); + tr_snprintf( s, sizeof( s ), "%'d %s", seconds, seconds==1?"seconds":"seconds" ); if( days ) { @@ -1346,7 +1346,7 @@ printTrackersImpl( tr_benc * trackerStats ) { tr_strltime( buf, now - lastAnnounceTime, sizeof( buf ) ); if( lastAnnounceSucceeded ) - printf( " Got a list of %'d peers %s ago\n", + printf( " Got a list of %d peers %s ago\n", (int)lastAnnouncePeerCount, buf ); else if( lastAnnounceTimedOut ) printf( " Peer list request timed out; will retry\n" ); @@ -1377,7 +1377,7 @@ printTrackersImpl( tr_benc * trackerStats ) { tr_strltime( buf, now - lastScrapeTime, sizeof( buf ) ); if( lastScrapeSucceeded ) - printf( " Tracker had %'d seeders and %'d leechers %s ago\n", + printf( " Tracker had %d seeders and %d leechers %s ago\n", (int)seederCount, (int)leecherCount, buf ); else if( lastScrapeTimedOut ) printf( " Tracker scrape timed out; will retry\n" ); -- 2.40.0