1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-12 07:03:44 +00:00

(trunk libT) fix a couple of minor gcc warnings

This commit is contained in:
Charles Kerr 2009-07-17 18:00:29 +00:00
parent 087446b134
commit 69bbff4d92
2 changed files with 7 additions and 3 deletions

View file

@ -1460,19 +1460,19 @@ tr_bencMergeDicts( tr_benc * target, const tr_benc * source )
}
else if( tr_bencIsReal( val ) )
{
double realVal;
double realVal = 0;
tr_bencGetReal( val, &realVal );
tr_bencDictAddReal( target, key, realVal );
}
else if( tr_bencIsInt( val ) )
{
int64_t intVal;
int64_t intVal = 0;
tr_bencGetInt( val, &intVal );
tr_bencDictAddInt( target, key, intVal );
}
else if( tr_bencIsString( val ) )
{
const char * strVal;
const char * strVal = NULL;
tr_bencGetStr( val, &strVal );
tr_bencDictAddStr( target, key, strVal );
}

View file

@ -398,7 +398,11 @@ void* tr_int2ptr( int );
decimal places in the printf()'s precision:
- printf("%.2f%%", 99.999 ) ==> "100.00%"
- printf("%.2f%%", tr_truncd(99.999, 2)) ==> "99.99%"
^ ^
| These should match |
+------------------------+
*/
double tr_truncd( double x, int decimal_places );