mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
(trunk libT) fix a couple of minor gcc warnings
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user