Changeset 2495


Ignore:
Timestamp:
Jul 25, 2007, 5:27:19 PM (16 years ago)
Author:
charles
Message:

fix compiler warnings reported by wereHamster

Location:
trunk/libtransmission
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r2328 r2495  
    378378
    379379    keyval = dict->val.l.vals + dict->val.l.count++;
    380     tr_bencInitStr( keyval, key, -1, 1 );
     380    tr_bencInitStr( keyval, (char*)key, -1, 1 );
    381381
    382382    itemval = dict->val.l.vals + dict->val.l.count++;
  • trunk/libtransmission/peerparse.h

    r2493 r2495  
    355355           bad share ratio . (Ticket #263) */
    356356        const int byteCount = tr_pieceSize( index );
    357         if( tor->downloadedCur >= byteCount )
     357        if( tor->downloadedCur >= (uint64_t)byteCount )
    358358            tor->downloadedCur -= byteCount;
    359359
  • trunk/libtransmission/torrent.c

    r2494 r2495  
    708708    assert( (int)lastBlock < tor->blockCount );
    709709    assert( firstBlock <= lastBlock );
    710     assert( TOR_BLOCK_PIECE( tor, firstBlock ) == file->firstPiece );
    711     assert( TOR_BLOCK_PIECE( tor, lastBlock ) == file->lastPiece );
     710    assert( (int)TOR_BLOCK_PIECE( tor, firstBlock ) == file->firstPiece );
     711    assert( (int)TOR_BLOCK_PIECE( tor, lastBlock ) == file->lastPiece );
    712712
    713713    if( firstBlock == lastBlock )
  • trunk/libtransmission/utils.c

    r2488 r2495  
    589589{
    590590    assert( bitfield != NULL );
    591     assert( 0 <= nth);
    592     assert( 0 <= BIN(nth) );
    593591    assert( BIN(nth) < bitfield->len );
    594592    bitfield->bits[ BIN(nth) ] |= BIT(nth);
     
    612610    if( bitfield != NULL )
    613611    {
    614         const int bin = BIN(nth);
     612        const size_t bin = BIN(nth);
    615613        assert( bin < bitfield->len );
    616614        bitfield->bits[bin] &= ~BIT(nth);
Note: See TracChangeset for help on using the changeset viewer.