Fixes warnings
This commit is contained in:
parent
734845196a
commit
1ec413ea5c
|
@ -127,13 +127,13 @@ int main( int argc, char ** argv )
|
|||
printf( "tracker: %s:%d\n",
|
||||
info->trackerAddress, info->trackerPort );
|
||||
printf( "announce: %s\n", info->trackerAnnounce );
|
||||
printf( "size: %lld (%lld * %d + %lld)\n",
|
||||
printf( "size: %"PRIu64" (%"PRIu64" * %d + %"PRIu64")\n",
|
||||
info->totalSize, info->totalSize / info->pieceSize,
|
||||
info->pieceSize, info->totalSize % info->pieceSize );
|
||||
printf( "file(s):\n" );
|
||||
for( i = 0; i < info->fileCount; i++ )
|
||||
{
|
||||
printf( " %s (%lld)\n", info->files[i].name,
|
||||
printf( " %s (%"PRIu64")\n", info->files[i].name,
|
||||
info->files[i].length );
|
||||
}
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ static void __bencPrint( benc_val_t * val, int space )
|
|||
switch( val->type )
|
||||
{
|
||||
case TYPE_INT:
|
||||
fprintf( stderr, "int: %lld\n", val->val.i );
|
||||
fprintf( stderr, "int: %"PRIu64"\n", val->val.i );
|
||||
break;
|
||||
|
||||
case TYPE_STR:
|
||||
|
@ -261,7 +261,7 @@ int tr_bencSave( benc_val_t * val, char ** buf, size_t * used, size_t * max )
|
|||
switch( val->type )
|
||||
{
|
||||
case TYPE_INT:
|
||||
if( tr_bencSprintf( buf, used, max, "i%llde", val->val.i ) )
|
||||
if( tr_bencSprintf( buf, used, max, "i%"PRIu64"e", val->val.i ) )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,12 @@
|
|||
# include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define UNUSED __attribute__((unused))
|
||||
#else
|
||||
# define UNUSED
|
||||
#endif
|
||||
|
||||
/* We use OpenSSL whenever possible, since it is likely to be more
|
||||
optimized and it is ok to use it with a MIT-licensed application.
|
||||
Otherwise, we use the included implementation by vi@nwr.jp. */
|
||||
|
|
|
@ -171,7 +171,7 @@ static void resolveRelease( tr_resolve_t * r )
|
|||
* Keeps waiting for addresses to resolve, and removes them from the
|
||||
* queue once resolution is done.
|
||||
**********************************************************************/
|
||||
static void resolveFunc( void * unused )
|
||||
static void resolveFunc( void * arg UNUSED )
|
||||
{
|
||||
tr_resolve_t * r;
|
||||
struct hostent * host;
|
||||
|
|
|
@ -332,9 +332,9 @@ static void sendQuery( tr_tracker_t * tc )
|
|||
"info_hash=%s&"
|
||||
"peer_id=%s&"
|
||||
"port=%d&"
|
||||
"uploaded=%lld&"
|
||||
"downloaded=%lld&"
|
||||
"left=%lld&"
|
||||
"uploaded=%"PRIu64"&"
|
||||
"downloaded=%"PRIu64"&"
|
||||
"left=%"PRIu64"&"
|
||||
"compact=1&"
|
||||
"numwant=50&"
|
||||
"key=%s"
|
||||
|
|
|
@ -28,6 +28,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#ifndef PRIu64
|
||||
# define PRIu64 "lld"
|
||||
#endif
|
||||
|
||||
#define SHA_DIGEST_LENGTH 20
|
||||
#ifdef __BEOS__
|
||||
|
|
Loading…
Reference in New Issue