Changeset 4761


Ignore:
Timestamp:
Feb 24, 2014 9:02:44 AM (8 years ago)
Author:
nanang
Message:

Re #1680: Fixed compile warnings on VS2005 for x64/win64 config.

Location:
pjproject/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util-test/json_test.c

    r4704 r4761  
    6464    pool = pj_pool_create(mem, "json", 1000, 1000, NULL); 
    6565 
    66     size = strlen(json_doc1); 
     66    size = (unsigned)strlen(json_doc1); 
    6767    elem = pj_json_parse(pool, json_doc1, &size, &err); 
    6868    if (!elem) { 
     
    7171    } 
    7272 
    73     size = strlen(json_doc1) * 2; 
     73    size = (unsigned)strlen(json_doc1) * 2; 
    7474    out_buf = pj_pool_alloc(pool, size); 
    7575 
  • pjproject/trunk/pjlib-util/src/pjlib-util/json.c

    r4704 r4761  
    196196on_error: 
    197197    output->slen = op - output->ptr; 
    198     return ip - token.ptr; 
     198    return (unsigned)(ip - token.ptr); 
    199199} 
    200200 
     
    335335    } 
    336336 
    337     *size = (buffer + *size) - st.scanner.curptr; 
     337    *size = (unsigned)((buffer + *size) - st.scanner.curptr); 
    338338 
    339339    pj_scan_fini(&st.scanner); 
     
    472472        } 
    473473 
    474         CHECK( st->writer( buf, op-buf, st->user_data) ); 
     474        CHECK( st->writer( buf, (unsigned)(op-buf), st->user_data) ); 
    475475        op = buf; 
    476476    } 
     
    550550            { 
    551551                CHECK( st->writer( st->space, 
    552                                    PJ_JSON_NAME_MIN_LEN - elem->name.slen, 
     552                                   (unsigned)(PJ_JSON_NAME_MIN_LEN - 
     553                                              elem->name.slen), 
    553554                                   st->user_data) ); 
    554555            } 
  • pjproject/trunk/pjlib/src/pj/errno.c

    r4613 r4761  
    110110    len = pj_ansi_snprintf( buf, size, "Unknown pjlib error %d", code); 
    111111    if (len < 1 || len >= (int)size) 
    112         len = size - 1; 
     112        len = (int)(size - 1); 
    113113    return len; 
    114114} 
     
    206206 
    207207    if (len < 1 || len >= (int)bufsize) { 
    208         len = bufsize - 1; 
     208        len = (int)(bufsize - 1); 
    209209        buf[len] = '\0'; 
    210210    } 
  • pjproject/trunk/pjlib/src/pj/log.c

    r4624 r4761  
    285285    if (thread_suspended_tls_id != -1)  
    286286    { 
    287         pj_thread_local_set(thread_suspended_tls_id, (void*)PJ_FALSE); 
     287        pj_thread_local_set(thread_suspended_tls_id, 
     288                            (void*)(pj_size_t)PJ_FALSE); 
    288289    } 
    289290    else 
  • pjproject/trunk/pjsip/src/pjsua2/json.cpp

    r4704 r4761  
    181181                            "Document already initialized"); 
    182182 
    183     unsigned size = input.size(); 
     183    unsigned size = (unsigned)input.size(); 
    184184    char *buffer = (char*)pj_pool_alloc(pool, size+1); 
    185185    unsigned parse_size = (unsigned)size; 
  • pjproject/trunk/pjsip/src/pjsua2/siptypes.cpp

    r4704 r4761  
    164164    ts.password         = str2Pj(this->password); 
    165165    ts.method           = this->method; 
    166     ts.ciphers_num      = this->ciphers.size(); 
     166    ts.ciphers_num      = (unsigned)this->ciphers.size(); 
    167167    // The following will only work if sizeof(enum)==sizeof(int) 
    168168    pj_assert(sizeof(ts.ciphers[0]) == sizeof(int)); 
     
    425425    pjMsgBody.clone_data    = &pjsip_clone_text_data; 
    426426    pjMsgBody.data          = (void*)body.c_str(); 
    427     pjMsgBody.len           = body.size(); 
     427    pjMsgBody.len           = (unsigned)body.size(); 
    428428    pjMpp.body = &pjMsgBody; 
    429429 
Note: See TracChangeset for help on using the changeset viewer.