Ignore:
Timestamp:
Jun 30, 2010, 4:40:19 PM (12 years ago)
Author:
charles
Message:

(trunk libT) down the rabbit hole: various minor type correctness changes unearthed by -Wconversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r10851 r10912  
    371371        {
    372372            size_t i, n;
    373             const int seedProbability = event->seedProbability;
     373            const int8_t seedProbability = event->seedProbability;
    374374            const tr_bool allAreSeeds = seedProbability == 100;
    375375            tr_pex * pex = tr_peerMgrArrayToPex( event->compact,
     
    417417***/
    418418
    419 static int
    420 getBytePiece( const tr_info * info,
    421               uint64_t        byteOffset )
     419static tr_piece_index_t
     420getBytePiece( const tr_info * info, uint64_t byteOffset )
    422421{
    423422    assert( info );
     
    457456{
    458457    tr_file_index_t i;
    459     int            priority = TR_PRI_LOW;
     458    tr_priority_t priority = TR_PRI_LOW;
    460459
    461460    /* find the first file that has data in this piece */
     
    568567
    569568    if( info->pieceSize )
    570         tor->lastPieceSize = info->totalSize % info->pieceSize;
     569        tor->lastPieceSize = (uint32_t)(info->totalSize % info->pieceSize);
    571570
    572571    if( !tor->lastPieceSize )
     
    984983
    985984    s->recheckProgress = s->activity == TR_STATUS_CHECK
    986                        ? 1.0 -
    987                          ( tr_torrentCountUncheckedPieces( tor ) /
    988                            (double) tor->info.pieceCount )
     985                       ? 1.0 - ( tr_torrentCountUncheckedPieces( tor ) / (float) tor->info.pieceCount )
    989986                       : 0.0;
    990987
     
    18451842{
    18461843    tr_file *        file;
    1847     const int        dnd = !doDownload;
     1844    const uint8_t    dnd = !doDownload;
    18481845    tr_piece_index_t firstPiece, firstPieceDND;
    18491846    tr_piece_index_t lastPiece, lastPieceDND;
Note: See TracChangeset for help on using the changeset viewer.