Fix casts in dlls/crypt32/decode.c
Dmitry Timoshkov
dmitry at codeweavers.com
Sun Oct 14 21:17:05 CDT 2007
"Gerald Pfeifer" <gerald at pfeifer.com> wrote:
> The patch below fixes the following diagnostics (rightfully) issued by
> GCC 4.3 and later. If you prefer, we could use LOWORD everywhere, also
> for the case labels, but my current patch seems to be more natural.
>
> decode.c:4365: warning: cast from pointer to integer of different size
> --- decode.c 12 Oct 2007 10:24:15 -0000 1.87
> +++ decode.c 14 Oct 2007 14:17:58 -0000
> @@ -4360,103 +4360,103 @@ static CryptDecodeObjectExFunc CRYPT_Get
> }
> if (!HIWORD(lpszStructType))
> {
> - switch (LOWORD(lpszStructType))
> + switch ((DWORD)lpszStructType)
Your fix still won't work for a 64-bit target. You would need to use
ULONG_PTR cast for that. 'if (!HIWORD(lpszStructType))' line also doesn't
look right in the 64-bit case.
dlls/crypt32/chain.c,CertVerifyCertificateChainPolicy() has the same problem.
--
Dmitry.
More information about the wine-devel
mailing list