Changeset 10919


Ignore:
Timestamp:
Jul 1, 2010, 5:39:54 AM (12 years ago)
Author:
charles
Message:

(trunk libT) a couple more minor -Wconversion warnings

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r10814 r10919  
    7070}
    7171
    72 static int
    73 tr_areThreadsEqual( tr_thread_id a,
    74                     tr_thread_id b )
     72static tr_bool
     73tr_areThreadsEqual( tr_thread_id a, tr_thread_id b )
    7574{
    7675#ifdef WIN32
    7776    return a == b;
    7877#else
    79     return pthread_equal( a, b );
     78    return pthread_equal( a, b ) != 0;
    8079#endif
    8180}
     
    9291};
    9392
    94 int
     93tr_bool
    9594tr_amInThread( const tr_thread * t )
    9695{
  • trunk/libtransmission/platform.h

    r10814 r10919  
    7575/** @brief Return nonzero if this function is being called from `thread'
    7676    @param thread the thread being tested */
    77 int tr_amInThread( const tr_thread * );
     77tr_bool tr_amInThread( const tr_thread * );
    7878
    7979/***
  • trunk/libtransmission/torrent.c

    r10918 r10919  
    11731173        const uint64_t b = isSeed ? tor->info.files[i].length : fileBytesCompleted( tor, i );
    11741174        walk->bytesCompleted = b;
    1175         walk->progress = tor->info.files[i].length > 0 ? ( (float)b / tor->info.files[i].length ) : 1.0;
     1175        walk->progress = tor->info.files[i].length > 0 ? ( b / tor->info.files[i].length ) : 1.0;
    11761176    }
    11771177
     
    18431843    tr_file *        file;
    18441844    const int8_t     dnd = !doDownload;
    1845     tr_piece_index_t firstPiece, firstPieceDND;
    1846     tr_piece_index_t lastPiece, lastPieceDND;
     1845    tr_piece_index_t firstPiece;
     1846    int8_t           firstPieceDND;
     1847    tr_piece_index_t lastPiece;
     1848    int8_t           lastPieceDND;
    18471849    tr_file_index_t  i;
    18481850
Note: See TracChangeset for help on using the changeset viewer.