Am Donnerstag, 28. Juni 2012, 20:50:15 schrieb Dmitry Timoshkov:
Obviosuly I'm not planning to add the casts everywhere, but the inline constructs which specifically targeting the pointer to integer conversions that imply truncation should compile without warnings IMHO.
Fwiw, I fixed a number of double-to-float conversion warnings in MSVC in wined3d, d3d8 and d3d9 a while ago, as well as some similar integer issues. I fixed most of those warnings by using the proper data types and explicitly using float literals. I added a handful of casts in places where the API differences forced me to(d3d vs GL clipplanes if I remember correctly).
From my experience with wined3d the majority warnings(~90 %) from msvc made
sense and pointed out potential bugs in the code. The rest were cases like the one Dmitry wants to patch where the API definitions force a conversion with potential data loss.