[ros-bugs] [Bug 5343] Rearrange cast order in MAKEINTRESOURCE
ReactOS.Bugzilla at reactos.org
ReactOS.Bugzilla at reactos.org
Mon May 3 20:26:24 CEST 2010
http://www.reactos.org/bugzilla/show_bug.cgi?id=5343
ThePhysicist <timo.kreuzer at web.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |timo.kreuzer at web.de
--- Comment #1 from ThePhysicist <timo.kreuzer at web.de> 2010-05-03 20:26:23 CET ---
That looks completely broken. How do you cast a WORD to LPSTR? If that doesn't
cause a warning then hcc is really broken.
The MS version is
#define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
when this leads to a warning when truncating the (i), a proper fix would be
#define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)(LOWORD(i))))
#define LOWORD(x) ((WORD)((DWORD_PTR)(x) & 0xffff))
--
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Ros-bugs
mailing list