[ros-dev] [ros-diffs] [jgardou] 54462: [RTL] - explicitly truncate some values, so it doesn't count as an error for compiler/MSVC runtime checker
Aleksey Bragin
aleksey at reactos.org
Thu Nov 24 08:04:56 UTC 2011
On 24.11.2011 3:27, Jérôme Gardou wrote:
> - *ShortPtr = SWAPW(*ShortPtr) + LOWORD(Delta);
> + *ShortPtr = SWAPW(*ShortPtr) + LOWORD(Delta& 0xFFFF);
Maybe turn off this "feature" of MSVC checker then? Excuse me, but it's
literally a code pollution. Especially the above case, of firstly ANDing
with 0xFFFF, and *then* applying LOWORD (which would not change anything
at all).
Or, as Timo said, maybe fix the macro? Move the cast elsewhere, so at
first you &, and only then cast?
WBR,
Aleskey.
More information about the Ros-dev
mailing list