Re: netapi32: Fix a pointer conversion warning on 64-bit
20 Jul
2009
20 Jul
'09
11:11 a.m.
Hi André, @@ -577,7 +577,7 @@ static UCHAR NetBTinetResolve(const UCHAR name[NCBNAMSZ], (*cacheEntry)->numAddresses = i; for (i = 0; i < (*cacheEntry)->numAddresses; i++) (*cacheEntry)->addresses[i] = - (DWORD)host->h_addr_list[i]; + (DWORD_PTR)host->h_addr_list[i]; This isn't correct, as the lvalue is still a DWORD, and needs to remain a DWORD. If you like you can check that the length, host->h_length, is the same as sizeof(DWORD), but this is pretty well implied by the use of gethostbyname(): it only returns addresses of type AF_INET. Basically, the warning is a false positive. --Juan
6079
Age (days ago)
6079
Last active (days ago)
0 comments
1 participants
participants (1)
-
Juan Lang