unicode.h and -Wcast-qual
David Laight
david at l8s.co.uk
Tue Jun 21 01:11:17 CDT 2005
On Mon, Jun 20, 2005 at 10:26:32PM +0200, Stefan Huehner wrote:
> In samba_4 sourcecode i discovered the following macros, which are
> apparently a hack but silences these warnings:
>
> #define discard_const(ptr) ((void *)((intptr_t)(ptr)))
> #define discard_const_p(type, ptr) ((type *)discard_const(ptr))
Or:
static inline void *deconst(const void *p)
{
return ((const char *)p - (const char *)0) + (char *)0;
}
David
--
David Laight: david at l8s.co.uk
More information about the wine-devel
mailing list