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