> David is right, the address is not stored as a pointer but as a DWORD in
> place of the chars. Like this:
>
> gethostbyname("winehq.org"):
> wrong: (DWORD) host->h_addr_list[i] = 0x00cbd1c8 = 200.209.203.0
> right: *(DWORD*) host->h_addr_list[i] = 0x86192ed1 = 209.46.25.134
Patch welcome ;)
--Ju
On Wed, 29 Jun 2011 08:31:58 +0100, David Laight wrote:
On Tue, Jun 28, 2011 at 03:18:47PM -0700, Juan Lang wrote:
>> This is a false positive. ?h_addr_list is declared as a char **,
and
>> technically it is, but gethostbyname only returns IPv4 addresses,
i.e.
>> ones that can fit in a DWORD.
On Tue, Jun 28, 2011 at 03:18:47PM -0700, Juan Lang wrote:
> >> This is a false positive. ?h_addr_list is declared as a char **, and
> >> technically it is, but gethostbyname only returns IPv4 addresses, i.e.
> >> ones that can fit in a DWORD.
> >
> > That doesn't sound like a problem that would gi
>> This is a false positive. h_addr_list is declared as a char **, and
>> technically it is, but gethostbyname only returns IPv4 addresses, i.e.
>> ones that can fit in a DWORD.
>
> That doesn't sound like a problem that would give that warning.
Why not? A cast of a pointer to a DWORD with 64-bi
On Tue, Jun 28, 2011 at 12:51:02PM -0700, Juan Lang wrote:
> ../../../dlls/netapi32/nbt.c:580:30: warning: cast from pointer to
> integer of different size [-Wpointer-to-int-cast]
>
> This is a false positive. h_addr_list is declared as a char **, and
> technically it is, but gethostbyname only r
../../../dlls/netapi32/nbt.c:580:30: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
This is a false positive. h_addr_list is declared as a char **, and
technically it is, but gethostbyname only returns IPv4 addresses, i.e.
ones that can fit in a DWORD.
--Juan
> ../../../../dlls/gdiplus/tests/image.c: In function ‘test_palette’:
> ../../../../dlls/gdiplus/tests/image.c:1773:104: warning: array subscript is
> above array bounds [-Warray-bounds]
This is because the ColorPalette structure has an array of length 1 at
the end, which is really a variable-len