Fix warnings

This commit is contained in:
Vinnie Falco
2013-08-26 13:50:07 -07:00
parent 3c79ebda17
commit 5c2da08c13
11 changed files with 42 additions and 54 deletions

View File

@@ -96,12 +96,12 @@ static void findIPAddresses (int sock, Array<IPAddress>& result)
{
ifconf cfg;
HeapBlock<char> buffer;
size_t bufferSize = 1024;
int bufferSize = 1024;
do
{
bufferSize *= 2;
buffer.calloc (bufferSize);
buffer.calloc ((size_t)bufferSize);
cfg.ifc_len = bufferSize;
cfg.ifc_buf = buffer;
@@ -109,7 +109,7 @@ static void findIPAddresses (int sock, Array<IPAddress>& result)
if (ioctl (sock, SIOCGIFCONF, &cfg) < 0 && errno != EINVAL)
return;
} while (bufferSize < cfg.ifc_len + 2 * (IFNAMSIZ + sizeof (struct sockaddr_in6)));
} while (bufferSize < cfg.ifc_len + 2 * (int) (IFNAMSIZ + sizeof (struct sockaddr_in6)));
#if BEAST_MAC || BEAST_IOS
while (cfg.ifc_len >= (int) (IFNAMSIZ + sizeof (struct sockaddr_in)))