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 <jelmer at samba.org> - http://jelmer.vernstok.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050620/62459b9a/attachment.pgp