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/utils.c

    r10911 r10912  
    5757time_t transmission_now = 0;
    5858
    59 int                  messageLevel = TR_MSG_INF;
     59tr_msg_level messageLevel = TR_MSG_INF;
    6060static tr_lock *      messageLock = NULL;
    6161static tr_bool        messageQueuing = FALSE;
     
    115115
    116116void
    117 tr_setMessageLevel( int level )
    118 {
    119     messageLevel = MAX( 0, level );
    120 }
    121 
    122 int
     117tr_setMessageLevel( tr_msg_level level )
     118{
     119    messageLevel = level;
     120}
     121
     122tr_msg_level
    123123tr_getMessageLevel( void )
    124124{
     
    256256void
    257257tr_msg( const char * file, int line,
    258         int level, const char * name,
     258        tr_msg_level level,
     259        const char * name,
    259260        const char * fmt, ... )
    260261{
     
    464465    int fd;
    465466    ssize_t n;
    466     const char * err_fmt = _( "Couldn't read \"%1$s\": %2$s" );
     467    const char * const err_fmt = _( "Couldn't read \"%1$s\": %2$s" );
    467468
    468469    /* try to stat the file */
     
    501502        return NULL;
    502503    }
    503     n = read( fd, buf, sb.st_size );
     504    n = read( fd, buf, (size_t)sb.st_size );
    504505    if( n == -1 )
    505506    {
     
    13921393    struct stat st;
    13931394    off_t bytesLeft;
    1394     const off_t buflen = 1024 * 128; /* 128 KiB buffer */
     1395    const size_t buflen = 1024 * 128; /* 128 KiB buffer */
    13951396
    13961397    /* make sure the old file exists */
Note: See TracChangeset for help on using the changeset viewer.