fix WIN32 warnings introduced in a31c86b8db

This commit is contained in:
Thomas Bernard 2018-10-31 16:26:01 +01:00
parent a31c86b8db
commit 4b87224e6f
1 changed files with 4 additions and 3 deletions

View File

@ -546,14 +546,11 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
destAddr.sin_port = 0; destAddr.sin_port = 0;
if (GetBestInterfaceEx((struct sockaddr *)&destAddr, &ifbestidx) == NO_ERROR) { if (GetBestInterfaceEx((struct sockaddr *)&destAddr, &ifbestidx) == NO_ERROR) {
DWORD dwRetVal = 0; DWORD dwRetVal = 0;
unsigned int i = 0;
PIP_ADAPTER_ADDRESSES pAddresses = NULL; PIP_ADAPTER_ADDRESSES pAddresses = NULL;
ULONG outBufLen = 0; ULONG outBufLen = 0;
ULONG Iterations = 0; ULONG Iterations = 0;
PIP_ADAPTER_ADDRESSES pCurrAddresses = NULL; PIP_ADAPTER_ADDRESSES pCurrAddresses = NULL;
PIP_ADAPTER_UNICAST_ADDRESS pUnicast = NULL; PIP_ADAPTER_UNICAST_ADDRESS pUnicast = NULL;
PIP_ADAPTER_ANYCAST_ADDRESS pAnycast = NULL;
PIP_ADAPTER_MULTICAST_ADDRESS pMulticast = NULL;
outBufLen = 15360; outBufLen = 15360;
do { do {
@ -577,6 +574,10 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
pCurrAddresses = pAddresses; pCurrAddresses = pAddresses;
while (pCurrAddresses) { while (pCurrAddresses) {
#ifdef DEBUG #ifdef DEBUG
int i;
PIP_ADAPTER_MULTICAST_ADDRESS pMulticast = NULL;
PIP_ADAPTER_ANYCAST_ADDRESS pAnycast = NULL;
printf("\tIfIndex (IPv4 interface): %u\n", pCurrAddresses->IfIndex); printf("\tIfIndex (IPv4 interface): %u\n", pCurrAddresses->IfIndex);
printf("\tAdapter name: %s\n", pCurrAddresses->AdapterName); printf("\tAdapter name: %s\n", pCurrAddresses->AdapterName);
pUnicast = pCurrAddresses->FirstUnicastAddress; pUnicast = pCurrAddresses->FirstUnicastAddress;