riched20: explicitly cast WPARAM to character types

Thomas Faber thfabba at
Mon Oct 24 13:10:50 CDT 2011

Hi Michael,

On 2011-10-23 21:25, Michael Stefaniuc wrote:
> On 10/22/2011 10:38 PM, Thomas Faber wrote:
>> This makes the use of casts more consistent and shows the conversion
>> Also fixes two MSVC warnings.
> To make it consistent remove the WCHAR cast 3 lines above.
> Casts are *not* there to show a conversion is intentional. They tell the
> compiler to STFU and to the human reader they mean "*WARNING* doing
> something odd here". So don't cry wolf when there's no wolf in sight.
> No clue anyway why MSVC even warns, integer to integer conversions are
> allowed. If you still want to get rid of those warnings the fix would be
> to change the type of charCode to WCHAR. To correctly unmarshal the
> WCHAR out of the WPARAM when passing it to ME_Char() use LOWORD().

good point, that sounds like a more appropriate solution. I'll see to it
when I find the time.


More information about the wine-devel mailing list