Changeset 6354


Ignore:
Timestamp:
Jul 17, 2008, 8:33:34 PM (13 years ago)
Author:
charles
Message:

(libT) fix some minor warnings foudn by clang's scan-build and reported by m1b

Location:
trunk/libtransmission
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/JSON_parser.c

    r6049 r6354  
    447447{
    448448    if (jc->callback) {
    449         int result = 1;
    450449        JSON_value value, *arg = NULL;
    451450       
     
    467466                        value.vu.str.length = jc->parse_buffer_count;
    468467                    } else {
    469                         result = sscanf(jc->parse_buffer, "%Lf", &value.vu.float_value);
     468                        sscanf(jc->parse_buffer, "%Lf", &value.vu.float_value);
    470469                    }
    471470                    break;
    472471                case JSON_T_INTEGER:
    473472                    arg = &value;
    474                     result = sscanf(jc->parse_buffer, JSON_PARSER_INTEGER_SSCANF_TOKEN, &value.vu.integer_value);
     473                    sscanf(jc->parse_buffer, JSON_PARSER_INTEGER_SSCANF_TOKEN, &value.vu.integer_value);
    475474                    break;
    476475                case JSON_T_STRING:
  • trunk/libtransmission/inout.c

    r6073 r6354  
    233233    int n;
    234234    tr_errno err;
    235     const tr_info * info;
    236235
    237236    /* only check one block at a time to prevent disk thrashing.
     
    246245    assert( pieceIndex < tor->info.pieceCount );
    247246
    248     info = &tor->info;
    249247    n = tr_torPieceCountBytes( tor, pieceIndex );
    250248
  • trunk/libtransmission/metainfo.c

    r6334 r6354  
    405405    /* get file or top directory name */
    406406    val = tr_bencDictFindFirst( beInfo, "name.utf-8", "name", NULL );
    407     if( parseFiles( inf, tr_bencDictFindFirst( beInfo,
    408                                                "name.utf-8", "name", NULL ),
     407    if( parseFiles( inf, val,
    409408                    tr_bencDictFind( beInfo, "files" ),
    410409                    tr_bencDictFind( beInfo, "length" ) ) )
  • trunk/libtransmission/session.c

    r6334 r6354  
    7474
    7575    val = total % base ? base - (total % base) : 0;
    76     total += val;
    7776    buf[19] = pool[val];
    7877    buf[20] = '\0';
  • trunk/libtransmission/torrent.c

    r6211 r6354  
    242242initFilePieces ( tr_info * info, tr_file_index_t fileIndex )
    243243{
    244     tr_file * file = &info->files[fileIndex];
     244    tr_file * file;
    245245    uint64_t firstByte, lastByte;
    246246
  • trunk/libtransmission/web.c

    r6329 r6354  
    5858    CURL * easy;
    5959    CURLMsg * msg;
    60     CURLcode res;
    6160
    6261    do {
     
    6968            if( msg->msg == CURLMSG_DONE ) {
    7069                easy = msg->easy_handle;
    71                 res = msg->data.result;
    7270                break;
    7371            }
Note: See TracChangeset for help on using the changeset viewer.