Changeset 3658


Ignore:
Timestamp:
Oct 30, 2007, 8:11:23 PM (14 years ago)
Author:
charles
Message:

fix compile warning

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/makemeta.c

    r3575 r3658  
    2020#include <sys/stat.h>
    2121#include <unistd.h>
     22#include <libgen.h> /* dirname, basename */
    2223#include <dirent.h>
    2324
  • trunk/libtransmission/peer-mgr.c

    r3619 r3658  
    724724    for( i=0; peerCount && i<blockCount; ++i )
    725725    {
    726         const int block = blocks[i];
     726        const uint64_t block = blocks[i];
    727727        const uint32_t index = tr_torBlockPiece( tor, block );
    728728        const uint32_t begin = (block * tor->blockSize) - (index * tor->info.pieceSize);
    729         const uint32_t length = tr_torBlockCountBytes( tor, block );
     729        const uint32_t length = tr_torBlockCountBytes( tor, (int)block );
    730730        int j;
    731         assert( _tr_block( tor, index, begin ) == block );
     731        assert( _tr_block( tor, index, begin ) == (int)block );
    732732        assert( begin < (uint32_t)tr_torPieceCountBytes( tor, (int)index ) );
    733733        assert( (begin + length) <= (uint32_t)tr_torPieceCountBytes( tor, (int)index ) );
    734734
     735fprintf( stderr, "looking for a peer that will take my request for block #%"PRIu64"\n", block );
    735736
    736737        /* find a peer who can ask for this block */
     
    751752
    752753                case TR_ADDREQ_OK:
     754                    fprintf( stderr, "peer %d will take it\n", j );
    753755                    tr_bitfieldAdd( t->requested, block );
    754756                    j = peerCount;
Note: See TracChangeset for help on using the changeset viewer.