advpack: Sign-compare warnings fix (Resend)

Andrew Talbot Andrew.Talbot at
Mon Jul 14 15:23:06 CDT 2008

Hi Michael,

Michael Stefaniuc wrote:

> Andrew Talbot wrote:
>> -        if (!szConvertedList || dwFileCount == -1)
>> +        if (!szConvertedList || (LONG)dwFileCount == -1)
> This one could be replaced by a comparison with either "-1u" or "~0".
> bye
> michael

The first of these would work; the second would not, since it just inverts
the bits of decimal zero, which is a signed int. (The reason I say "decimal
zero" is because decimal constants are signed, whereas hexadecimal constants
are unsigned[!] Thus, ~0x0 would be a viable alternative.)

Thanks and regards,


More information about the wine-devel mailing list