Ignore:
Timestamp:
Jun 30, 2010, 4:40:19 PM (11 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/verify.c

    r10904 r10912  
    6161    const time_t begin = tr_time( );
    6262    time_t end;
    63     const int64_t buflen = 1024 * 128; /* 128 KiB buffer */
     63    const size_t buflen = 1024 * 128; /* 128 KiB buffer */
    6464    uint8_t * buffer = tr_valloc( buflen );
    6565
     
    7070    while( !*stopFlag && ( pieceIndex < tor->info.pieceCount ) )
    7171    {
    72         int64_t leftInPiece;
    73         int64_t leftInFile;
    74         int64_t bytesThisPass;
     72        uint32_t leftInPiece;
     73        uint32_t bytesThisPass;
     74        uint64_t leftInFile;
    7575        const tr_file * file = &tor->info.files[fileIndex];
    7676
     
    102102        if( fd >= 0 ) {
    103103            const ssize_t numRead = tr_pread( fd, buffer, bytesThisPass, filePos );
    104             if( numRead == bytesThisPass )
     104            if( numRead == (ssize_t)bytesThisPass )
    105105                SHA1_Update( &sha, buffer, numRead );
    106106            if( numRead > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.