RSABASE/TESTS: Fix signed/unsigned comparison warnings

Hans Leidekker hans at it.vu.nl
Mon Aug 9 05:17:38 CDT 2004


On Monday 09 August 2004 11:17, Dmitry Timoshkov wrote:

> > - if (GetLastError()==NTE_BAD_KEYSET)
> > + LONG gle = GetLastError();
> > + if (gle==NTE_BAD_KEYSET)
> 
> This is ugly. This kind of "fixes" clutters Wine code and should be
> deprecated.

What do you propose then? I could do something like this:

  if (GetLastError()==(DWORD)NTE_BAD_KEYSET)

But I consider a cast even uglier then introducing an intermediate
variable. We somehow have to live with the fact that NTE_BAD_KEYSET
is defined as ((HRESULT)0x80090016L), which is signed, and GetLastError()
returning DWORD, i.e unsigned.

 -Hans



More information about the wine-devel mailing list