kernel32: Remove unneeded casts
r.kalbermatter at hccnet.nl
Thu Dec 20 13:29:08 CST 2007
Robert Shearman wrote:
> Andrew Talbot wrote:
> > /* All local heap allocations are aligned on 4-byte boundaries */
> > #define LALIGN(word) (((word) + 3) & ~3)
> > -#define ARENA_PTR(ptr,arena) ((LOCALARENA
> > +#define ARENA_PTR(ptr,arena) ((LOCALARENA *)((ptr)+(arena)))
> Don't remove casts from macros like this as they then won't
> be safe if the type that is passed in is changed to something
> else (like void *).
I think this would give a compile error but more fatal could be if someone
happens to pass in a variable that was declared like
Then the offset calculation would be all wrong.
More information about the wine-devel