Hi,

On Mon, Jun 20, 2005 at 10:26:32PM +0200, Stefan Huehner wrote about 'unicode.h 
and -Wcast-qual':
> Hi,

> i am currently trying to fix the -Wcast-qual warnings. In
> include/wine/unicode.h there a 4 function:

> 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))

> an crude proof of concept is attached as a patch.

> I am not sure how portable this solution is...
It should be fairly portable as it works on all of the platforms Samba runs
on, which includes odd ones such as AIX, Cray, various BSDs, solaris..

Cheers,

Jelmer
-- 
Jelmer Vernooij <[EMAIL PROTECTED]> - http://jelmer.vernstok.nl/

Attachment: signature.asc
Description: Digital signature

Reply via email to