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/pjlib-util/src/pjlib-util/srv_resolver.c

    r5115 r5170  
    617617        for (i=0; i<query_job->srv_cnt; ++i) { 
    618618            unsigned j; 
    619             struct srv_target *srv = &query_job->srv[i]; 
    620  
    621             srv_rec.entry[srv_rec.count].priority = srv->priority; 
    622             srv_rec.entry[srv_rec.count].weight = srv->weight; 
    623             srv_rec.entry[srv_rec.count].port = (pj_uint16_t)srv->port ; 
    624  
    625             srv_rec.entry[srv_rec.count].server.name = srv->target_name; 
    626             srv_rec.entry[srv_rec.count].server.alias = srv->cname; 
     619            struct srv_target *srv2 = &query_job->srv[i]; 
     620 
     621            srv_rec.entry[srv_rec.count].priority = srv2->priority; 
     622            srv_rec.entry[srv_rec.count].weight = srv2->weight; 
     623            srv_rec.entry[srv_rec.count].port = (pj_uint16_t)srv2->port ; 
     624 
     625            srv_rec.entry[srv_rec.count].server.name = srv2->target_name; 
     626            srv_rec.entry[srv_rec.count].server.alias = srv2->cname; 
    627627            srv_rec.entry[srv_rec.count].server.addr_count = 0; 
    628628 
    629             pj_assert(srv->addr_cnt <= PJ_DNS_MAX_IP_IN_A_REC); 
    630  
    631             for (j=0; j<srv->addr_cnt; ++j) { 
     629            pj_assert(srv2->addr_cnt <= PJ_DNS_MAX_IP_IN_A_REC); 
     630 
     631            for (j=0; j<srv2->addr_cnt; ++j) { 
    632632                srv_rec.entry[srv_rec.count].server.addr[j].s_addr =  
    633                     srv->addr[j].s_addr; 
     633                    srv2->addr[j].s_addr; 
    634634                ++srv_rec.entry[srv_rec.count].server.addr_count; 
    635635            } 
    636636 
    637             if (srv->addr_cnt > 0) { 
     637            if (srv2->addr_cnt > 0) { 
    638638                ++srv_rec.count; 
    639639                if (srv_rec.count == PJ_DNS_SRV_MAX_ADDR) 
Note: See TracChangeset for help on using the changeset viewer.