netapi32: Fix a pointer conversion warning on 64-bit

Juan Lang juan.lang at gmail.com
Mon Jul 20 11:11:45 CDT 2009


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



More information about the wine-devel mailing list