fix a few warnings (WIN32)

This commit is contained in:
Thomas Bernard 2015-09-16 00:31:34 +02:00
parent b7b8711dd2
commit f6d84e6705

View File

@ -537,6 +537,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
}
if(pIPAddrTable) {
dwRetVal = GetIpAddrTable( pIPAddrTable, &dwSize, 0 );
if (dwRetVal == NO_ERROR) {
#ifdef DEBUG
printf("\tNum Entries: %ld\n", pIPAddrTable->dwNumEntries);
#endif
@ -567,6 +568,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
#endif
}
}
}
free(pIPAddrTable);
pIPAddrTable = NULL;
}
@ -586,7 +588,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
}
#ifdef _WIN32
if(setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_TTL, &_ttl, sizeof(_ttl)) < 0)
if(setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_TTL, (const char *)&_ttl, sizeof(_ttl)) < 0)
#else /* _WIN32 */
if(setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0)
#endif /* _WIN32 */