Changeset 3254 for pjproject


Ignore:
Timestamp:
Aug 6, 2010 4:20:48 AM (14 years ago)
Author:
nanang
Message:

Misc (re #1068): fix compile error missing explicit casting for malloc in pjlib-test/ssl_sock.c on Symbian S60 5th ed (compiled as C++?).

File:
1 edited

Legend:

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

    r3117 r3254  
    204204 
    205205    /* Duplicate parent test state to newly accepted test state */ 
    206     st = pj_pool_zalloc(parent_st->pool, sizeof(struct test_state)); 
     206    st = (struct test_state*)pj_pool_zalloc(parent_st->pool, sizeof(struct test_state)); 
    207207    *st = *parent_st; 
    208208    pj_ssl_sock_set_user_data(newsock, st); 
     
    598598        state_cli.send_str_len = (pj_rand() % 5 + 1) * 1024 + pj_rand() % 1024; 
    599599    } 
    600     state_cli.send_str = pj_pool_alloc(pool, state_cli.send_str_len); 
     600    state_cli.send_str = (char*)pj_pool_alloc(pool, state_cli.send_str_len); 
    601601    { 
    602602        unsigned i; 
     
    12101210 
    12111211    /* Allocate SSL socket pointers and test state */ 
    1212     ssock_cli = pj_pool_calloc(pool, clients, sizeof(pj_ssl_sock_t*)); 
    1213     state_cli = pj_pool_calloc(pool, clients, sizeof(struct test_state)); 
     1212    ssock_cli = (pj_ssl_sock_t**)pj_pool_calloc(pool, clients, sizeof(pj_ssl_sock_t*)); 
     1213    state_cli = (struct test_state*)pj_pool_calloc(pool, clients, sizeof(struct test_state)); 
    12141214 
    12151215    /* Get start timestamp */ 
     
    12231223        state_cli[i].check_echo = PJ_TRUE; 
    12241224        state_cli[i].send_str_len = (pj_rand() % 5 + 1) * 1024 + pj_rand() % 1024; 
    1225         state_cli[i].send_str = pj_pool_alloc(pool, state_cli[i].send_str_len); 
     1225        state_cli[i].send_str = (char*)pj_pool_alloc(pool, state_cli[i].send_str_len); 
    12261226        { 
    12271227            unsigned j; 
Note: See TracChangeset for help on using the changeset viewer.