comctl32/tests: Add two casts to avoid comparisons of differentint types.

Janne Hakonen joyer83 at
Sun Feb 13 14:00:58 CST 2011

> Hmm, looking at this my patch changes
>    ok(*(ULONG_PTR*)g_drawitem.itemData == lparam,
>       "got %lx, expected %lx\n", gdrawitem.itemData, lparam);
> to
>    ok(*(ULONG_PTR*)g_drawitem.itemData == (ULONG)lparam,
>        "got %lx, expected %lx\n", g_drawitem.itemData, lparam);
> That is, the only difference is the (ULONG) cast.  Given the output above,
> my patch did not trigger this failure since based on the printing of the
> two values they are different.

Actually, now with your change you are comparing ULONG_PTR to ULONG.
With 64 bit binary the left side of comparison is a 64 bit pointer and right 
side is 32 bit value.

Best Regards,
Janne Hakonen 

More information about the wine-devel mailing list