fixed warnings: comparison of integer expressions of different signedness

pull/13476/head
talorion 2020-08-22 13:01:00 +02:00 committed by Gregor Mayramhof
parent 2a6f00642e
commit 9af18af756
1 changed files with 3 additions and 2 deletions

View File

@ -489,11 +489,12 @@ static nsapi_size_or_error_t nsapi_dns_query_multiple(NetworkStack *stack, const
nsapi_addr *tmp = new (std::nothrow) nsapi_addr_t [MBED_CONF_NSAPI_DNS_ADDRESSES_LIMIT]; nsapi_addr *tmp = new (std::nothrow) nsapi_addr_t [MBED_CONF_NSAPI_DNS_ADDRESSES_LIMIT];
int cached = nsapi_dns_cache_find(host, version, tmp); int cached = nsapi_dns_cache_find(host, version, tmp);
if (cached > 0) { if (cached > 0) {
for (unsigned int i = 0; i < MIN(cached, addr_count); i++) { unsigned int us_cached = cached;
for (unsigned int i = 0; i < MIN(us_cached, addr_count); i++) {
addr[i] = tmp[i]; addr[i] = tmp[i];
} }
delete [] tmp; delete [] tmp;
return MIN(cached, addr_count); return MIN(us_cached, addr_count);
} }
delete [] tmp; delete [] tmp;
// create a udp socket // create a udp socket