Ignore:
Timestamp:
Aug 25, 2015 8:45:46 AM (9 years ago)
Author:
nanang
Message:

Re #1881: Fixed compile warnings on VS2015 about declaration hides previous declaration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice_session.c

    r5070 r5170  
    16011601                              const pj_str_t *rem_ufrag, 
    16021602                              const pj_str_t *rem_passwd, 
    1603                               unsigned rcand_cnt, 
    1604                               const pj_ice_sess_cand rcand[]) 
     1603                              unsigned rem_cand_cnt, 
     1604                              const pj_ice_sess_cand rem_cand[]) 
    16051605{ 
    16061606    pj_ice_sess_checklist *clist; 
     
    16121612    pj_status_t status; 
    16131613 
    1614     PJ_ASSERT_RETURN(ice && rem_ufrag && rem_passwd && rcand_cnt && rcand, 
    1615                      PJ_EINVAL); 
    1616     PJ_ASSERT_RETURN(rcand_cnt + ice->rcand_cnt <= PJ_ICE_MAX_CAND,  
     1614    PJ_ASSERT_RETURN(ice && rem_ufrag && rem_passwd && rem_cand_cnt && 
     1615                     rem_cand, PJ_EINVAL); 
     1616    PJ_ASSERT_RETURN(rem_cand_cnt + ice->rcand_cnt <= PJ_ICE_MAX_CAND, 
    16171617                     PJ_ETOOMANY); 
    16181618 
     
    16391639    /* Save remote candidates */ 
    16401640    ice->rcand_cnt = 0; 
    1641     for (i=0; i<rcand_cnt; ++i) { 
     1641    for (i=0; i<rem_cand_cnt; ++i) { 
    16421642        pj_ice_sess_cand *cn = &ice->rcand[ice->rcand_cnt]; 
    16431643 
    16441644        /* Ignore candidate which has no matching component ID */ 
    1645         if (rcand[i].comp_id==0 || rcand[i].comp_id > ice->comp_cnt) { 
     1645        if (rem_cand[i].comp_id==0 || rem_cand[i].comp_id > ice->comp_cnt) { 
    16461646            continue; 
    16471647        } 
    16481648 
    1649         if (rcand[i].comp_id > highest_comp) 
    1650             highest_comp = rcand[i].comp_id; 
    1651  
    1652         pj_memcpy(cn, &rcand[i], sizeof(pj_ice_sess_cand)); 
    1653         pj_strdup(ice->pool, &cn->foundation, &rcand[i].foundation); 
     1649        if (rem_cand[i].comp_id > highest_comp) 
     1650            highest_comp = rem_cand[i].comp_id; 
     1651 
     1652        pj_memcpy(cn, &rem_cand[i], sizeof(pj_ice_sess_cand)); 
     1653        pj_strdup(ice->pool, &cn->foundation, &rem_cand[i].foundation); 
    16541654        ice->rcand_cnt++; 
    16551655    } 
Note: See TracChangeset for help on using the changeset viewer.