advpack: Sign-compare warnings fix (Resend)

Michael Karcher wine at
Tue Jul 15 00:47:57 CDT 2008

Am Montag, den 14.07.2008, 23:33 +0100 schrieb Andrew Talbot:
> >> (The reason I say
> >> "decimal zero" is because decimal constants are signed, whereas
> >> hexadecimal constants are unsigned[!] Thus, ~0x0 would be a viable
> >> alternative.)
> > In fact, I have just tried both ~0 and ~0x0 and neither worked. (I can't
> > figure out why the latter fails.) But -1u works, yes.
> Sorry for the noise, but just to say I was wrong in claiming that hex
> constants are unsigned. I have opted for ~0U in try #2.

Good choice. While I wanted to post that I like -1u much better, as I
feel it as the canonical choice for all-bits-set, a grep on the wine
source code showed that wine always uses ~0U, and never -1U, so in wine
it is ~0U (or ~0UL if dealing with platform longs).

  Michael Karcher

More information about the wine-devel mailing list